Replies: 1 comment
-
To achieve the desired output where the READY column displays as a fraction (e.g., 1/1), you'd need to use the JSONPath feature in kubebuilder:printcolumn. Here's how you can set it up for a single field: // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".spec.ready" For your desired output, you may have to look into extending kubectl or writing a custom script to fetch and format the resources in your desired way. If the core Kubernetes project or the controller-tools project (which handles the generation of CRD manifests from the kubebuilder annotations) so you might want check the documentation and raise issues for their projects as well as raise questions in the controller-runtime slack channel. I hope that it answered your question. |
Beta Was this translation helpful? Give feedback.
-
I wander how to set the printcolum to make ready column like this.
Beta Was this translation helpful? Give feedback.
All reactions