kubernetes-sigs / kubebuilder

Kubebuilder - SDK for building Kubernetes APIs using CRDs
http://book.kubebuilder.io
Apache License 2.0
7.91k stars 1.45k forks source link

Update Cronjob and Multiversion Tutorials samples to Use Status Conditions #4019

Open camilamacedo86 opened 4 months ago

camilamacedo86 commented 4 months ago

What do you want to happen?

Currently, we have two samples used in the docs that share the same base:

In order to follow Kubernetes API Conventions and promote best practices, the status fields in these examples should use status conditions similar to those scaffolded by the Deploy Image Plugin.

Here is an example of using status conditions in the API definition:

And here is how status conditions are handled in the controller:

Proposal: Update the Cronjob and Multiversion tutorials to incorporate StatusConditions as demonstrated in the examples provided. This will ensure that these tutorials are aligned with Kubernetes API conventions and serve as better references for best practices.

Important See that for we change the CronjobTutorial we need to change the values in the hack. https://github.com/kubernetes-sigs/kubebuilder/tree/master/hack/docs/internal/cronjob-tutorial. The samples are generated and the code with the docs info is added on top when we run make generate. See the makefile target: https://github.com/kubernetes-sigs/kubebuilder/blob/master/Makefile#L82-L84

Extra Labels

No response

lohitslohit commented 4 months ago

@camilamacedo86 I am working on this..

Bharadwajshivam28 commented 2 weeks ago

@camilamacedo86 I am working on this.. /assign