-
Notifications
You must be signed in to change notification settings - Fork 425
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
feature: support the (X/Y) display mode for the printcolumn field in kubebuilder #1051
Comments
If there is a way to do this with CRDs we can generate them accordingly with controller-gen. If there is not, Kubernetes has to implement support for it first in the apiserver (and this issue should be opened in the kubernetes/kubernetes repo) |
Hi @sbueringer Just to clarify the scenario, users are looking for type FooSpec struct {
Ready int `json:"ready"`
Total int `json:"total"`
}
// +kubebuilder:object:root=true
// +kubebuilder:printcolumn:name="READY",type=string,JSONPath=`{.spec.ready}/{.spec.total}`
type Foo struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec FooSpec `json:"spec,omitempty"`
Status FooStatus `json:"status,omitempty"`
} However, seems that
does not work. So, this issue is to ask for add the support to allow operations via So, should the request with this example be raised against |
If it is not supported by Kubernetes today, I don't see how we can support it in controller-gen. So yes, if it's not supported by the apiserver today, we should open an issue for the apiserver not for controller-gen |
Is there a way we could support a MultiJsonPath-like approach, allowing multiple JsonPaths to be combined? This would make the display more flexible, rather than being limited to specific JsonPaths only. |
Sorry to say this again. This repository only contains controller-gen. controller-gen is a command line tool to generate CRD YAMLs. This repository does not contain any kube-apiserver code. Because of that we cannot modify controller-gen to implement a feature that is not supported in the kube-apiserver first. |
Thanks for the response! I appreciate it. I'm sorry for repeatedly asking you about the same thing. It's because I don't understand how it's generated. Also, if I want a similar feature, I need kube-apiserver support, right? If so, I'll go ahead and submit an issue in kubernetes/kubernetes to discuss and track this matter. |
Hi @googs1025
Yes, that seems the right thing to do. I think that is the project: https://github.com/kubernetes/apiserver To clarify the scenario. |
Maybe we should file an issue in kubernetes/kubernetes, since the kubernetes/apiserver repository is the one to sync :) |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/close As this cannot be fixed / implemented in controller-tools |
@sbueringer: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/kind feature
As mentioned in the title and our discussion here kubernetes-sigs/kubebuilder#4134, can we support a JsonPath-like way of multiple combinations? This would allow for more flexible and rich display in CRs, for example, in the format of (X/Y).
It seems that there are others who have the same need.
The text was updated successfully, but these errors were encountered: