Open scholzj opened 1 month ago
Triaged on 03.10.2024: we agreed on having the additional columns.
Id like to volunteer to work on this
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.
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
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 https://github.com/fabric8io/kubernetes-client/pull/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?
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.
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.
I have created a PR that addresses what we can for now.
Remaining:
We should define some additional columns to the
KafkaAccess
CRD so that it shows a bit more useful information when you dokubectl get kafkaacces
orkubectl get kafkaaccess -o wide
. TheReady
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.