kubernetes-sigs / lws

LeaderWorkerSet: An API for deploying a group of pods as a unit of replication
Apache License 2.0
135 stars 26 forks source link

feature: add more meaningful fields to crd objects #210

Open googs1025 opened 2 months ago

googs1025 commented 2 months ago

What would you like to be added: Currently, when using kubectl get with lws , there are only two fields displayed: name and age. We should provide more meaningful fields to make it more convenient to use.

root@VM-0-8-ubuntu:/home/ubuntu# kubectl get lws
NAME                        AGE
leaderworkerset-sample      5h21m

We should provide more meaningful fields, which will be more convenient to use as follows:

root@VM-0-8-ubuntu:/home/ubuntu# kubectl get lws
NAME                     READY   UP-TO-DATE   AGE
leaderworkerset-sample   3/3     3            5h21m

There were some minor problems during implementation. FRY: https://github.com/kubernetes-sigs/kubebuilder/discussions/4134 I am not sure whether the current JSONPath of kubebuilder can achieve a display effect similar to (X/Y). In addition, should we add other useful fields (maybe we can also discuss this PR)? If not, I will close this issue

Why is this needed:

This enhancement requires the following artifacts:

The artifacts should be linked in subsequent comments.

googs1025 commented 2 months ago

/assign

liurupeng commented 2 months ago

@googs1025 Yes, I think adding "READY" and "UP-TO-Update" will be very useful

googs1025 commented 2 months ago

That's great, but there's a small problem. https://github.com/kubernetes-sigs/kubebuilder/discussions/4134 This problem can be solved by adding an extra field to the status, but I don't think this is a good way to handle it. Maybe we can wait until this problem is solved before implementing it

googs1025 commented 2 months ago

issue tracked: https://github.com/kubernetes-sigs/controller-tools/issues/1051

kerthcet commented 2 months ago

Glad to see this aligned with deployment or statefulset which has richer columns.