Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define additional printer columns in the KafkaAccess CRD #53

Open
scholzj opened this issue Sep 27, 2024 · 8 comments
Open

Define additional printer columns in the KafkaAccess CRD #53

scholzj opened this issue Sep 27, 2024 · 8 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@scholzj
Copy link
Member

scholzj commented Sep 27, 2024

We should define some additional columns to the KafkaAccess CRD so that it shows a bit more useful information when you do kubectl get kafkaacces or kubectl get kafkaaccess -o wide. The Ready column / state would be the most obvious thing to add there.

We should probably also add it to the strimzi group to have it listed together with the other Strimzi CRs.

@scholzj scholzj added enhancement New feature or request needs-triage labels Sep 27, 2024
@ppatierno ppatierno added help wanted Extra attention is needed and removed needs-triage labels Oct 3, 2024
@ppatierno
Copy link
Member

Triaged on 03.10.2024: we agreed on having the additional columns.

@MichaelMorrisEst
Copy link
Contributor

Id like to volunteer to work on this

@scholzj
Copy link
Member Author

scholzj commented Oct 10, 2024

You can definitely look into it. But unfortunately, because this is using the Java Operator SDK, I have no idea where to start. Not sure if @katheris has any idea.

@katheris
Copy link
Contributor

I think Java Operator SDK uses the fabric8 CRD generator under the covers, so you should be able to use an annotation https://github.com/fabric8io/kubernetes-client/blob/main/doc/CRD-generator.md#iofabric8crdgeneratorannotationprintercolumn

@MichaelMorrisEst
Copy link
Contributor

I'd suggest the following additional columns:

NAME              CLUSTER      LISTENER   USER      READY  
my-kafka-access   my-cluster   tls        my-user   False

Does this sound ok?

The cluster, listener and user can easily be added using the annotation suggested above. However the ready column cannot as the annotation does not support filters and hence there is no way to filter the conditions for the Ready condition (i.e. no way to specify conditions[?(@.type==\"Ready\")])

There is however a new annotation in development (see fabric8io/kubernetes-client#6390) that will allow the filter be specified.

We can wait for that to be released, or we can manually update 040-Crd-kafkaaccess.yaml until such time as that is released. If I'm not missing anything, it looks like 040-Crd-kafkaaccess.yaml is not automatically updated with the output from the crd generator as part of the build anyway?

@scholzj
Copy link
Member Author

scholzj commented Oct 14, 2024

Thanks for looking into this. I think the suggested columns look good. But we should not modify the CRDs manually (and I think the recent PRs made it updated with the generated ones out of the box). We should either wait for the support to be added - or if you want we can add what we can right now and add the remaining columns in the future when available.

@katheris
Copy link
Contributor

I'm also happy with the columns you proposed. And fine either way if we wait or add what is supported now and then add the final column in future.

@MichaelMorrisEst
Copy link
Contributor

I have created a PR that addresses what we can for now.

Remaining:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants