cloud-ark / kubeplus

Kubernetes Operator for multi-instance multi-tenancy
https://cloudark.io/
Apache License 2.0
662 stars 82 forks source link

Add label to the CRD registered by KubePlus #1203

Closed devdattakulkarni closed 10 months ago

devdattakulkarni commented 10 months ago

As part of registering the CRD defined in ResourceComposition, we should add a unique label to the CRD (say, registered-by:kubeplus). This will enable using the label selectors to query the CRDs registered by KubePlus easily using kubectl.

Example: kubectl label crd atomicgggs.platformapi.kubeplus registered-by=kubeplus --kubeconfig=kubeplus-saas-provider.json

kubectl get crds -l registered-by=kubeplus --kubeconfig=kubeplus-saas-provider.json

NAME CREATED AT atomicgggs.platformapi.kubeplus 2024-01-05T11:55:46Z