From bb7f1551aceac2bf5b35abb421b98604a4929d5d Mon Sep 17 00:00:00 2001 From: Dev <732525+devdattakulkarni@users.noreply.github.com> Date: Sun, 7 Jan 2024 14:15:52 -0600 Subject: [PATCH] Adding a label to identify CRDs registered by KubePlus (#1204) Fixes: https://github.com/cloud-ark/kubeplus/issues/1203 --- deploy/kubeconfiggenerator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deploy/kubeconfiggenerator.py b/deploy/kubeconfiggenerator.py index 52c6f36a..cd701a8a 100644 --- a/deploy/kubeconfiggenerator.py +++ b/deploy/kubeconfiggenerator.py @@ -675,7 +675,10 @@ def registercrd(): crd = {} crd['apiVersion'] = "apiextensions.k8s.io/v1" crd['kind'] = "CustomResourceDefinition" - crd['metadata'] = {'name':plural + "." + group} + registered_by = {} + registered_by['registered-by'] = "kubeplus" + crd['metadata'] = {'name':plural + "." + group, + 'labels': registered_by } crd['spec'] = {"group":group, "names":{"kind": kind, "listKind": kind + "List","plural":plural,"singular":kind.lower()}, "scope": "Namespaced", "versions": [{"name": "v1alpha1", "schema": attr_types, "served": True, "storage": True}]} #"status": {