From 3516e02a492632c9d4fed66e663e7feb2533165a Mon Sep 17 00:00:00 2001 From: Vishal Choudhary Date: Fri, 31 May 2024 03:58:26 +0530 Subject: [PATCH] chore: bump controller gen (#349) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: bump controller-gen to 0.14.0 Signed-off-by: Vishal Choudhary * chore: update controller-gen cmd controller gen throws an error when multiple instances of the same generator 'crd' in this case is specified. See: https://github.com/kubernetes-sigs/controller-tools/pull/829 Signed-off-by: Vishal Choudhary * chore: gen code Signed-off-by: Vishal Choudhary * fix: crd codegen Signed-off-by: Vishal Choudhary --------- Signed-off-by: Vishal Choudhary Co-authored-by: Charles-Edouard Brétéché --- .crds/json.kyverno.io_validatingpolicies.yaml | 19 ++++++++++++------- Makefile | 4 ++-- charts/kyverno-json/templates/crds.yaml | 19 ++++++++++++------- .../json.kyverno.io_validatingpolicies.yaml | 19 ++++++++++++------- 4 files changed, 38 insertions(+), 23 deletions(-) diff --git a/.crds/json.kyverno.io_validatingpolicies.yaml b/.crds/json.kyverno.io_validatingpolicies.yaml index 1ec7685d..a083678f 100644 --- a/.crds/json.kyverno.io_validatingpolicies.yaml +++ b/.crds/json.kyverno.io_validatingpolicies.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.14.0 name: validatingpolicies.json.kyverno.io spec: group: json.kyverno.io @@ -20,14 +20,19 @@ spec: description: ValidatingPolicy is the resource that contains the policy definition. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object diff --git a/Makefile b/Makefile index 63081002..4e4a97ce 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ REGISTER_GEN := $(TOOLS_DIR)/register-gen DEEPCOPY_GEN := $(TOOLS_DIR)/deepcopy-gen CODE_GEN_VERSION := v0.28.0 CONTROLLER_GEN := $(TOOLS_DIR)/controller-gen -CONTROLLER_GEN_VERSION := v0.12.0 +CONTROLLER_GEN_VERSION := v0.14.0 REFERENCE_DOCS := $(TOOLS_DIR)/genref REFERENCE_DOCS_VERSION := latest KIND := $(TOOLS_DIR)/kind @@ -205,7 +205,7 @@ codegen-deepcopy: $(PACKAGE_SHIM) $(DEEPCOPY_GEN) ## Generate deep copy function codegen-crds: $(CONTROLLER_GEN) ## Generate CRDs @echo Generate crds... >&2 @rm -rf $(CRDS_PATH) - @$(CONTROLLER_GEN) crd paths=./pkg/apis/... crd:crdVersions=v1 output:dir=$(CRDS_PATH) + @$(CONTROLLER_GEN) paths=./pkg/apis/... crd:crdVersions=v1 output:dir=$(CRDS_PATH) @echo Copy generated CRDs to embed in the CLI... >&2 @rm -rf pkg/data/crds && mkdir -p pkg/data/crds @cp $(CRDS_PATH)/* pkg/data/crds diff --git a/charts/kyverno-json/templates/crds.yaml b/charts/kyverno-json/templates/crds.yaml index 3cbe7ad4..9322a0ad 100644 --- a/charts/kyverno-json/templates/crds.yaml +++ b/charts/kyverno-json/templates/crds.yaml @@ -12,7 +12,7 @@ metadata: {{- with .Values.crds.annotations }} {{- toYaml . | nindent 4 }} {{- end }} - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.14.0 name: validatingpolicies.json.kyverno.io spec: group: json.kyverno.io @@ -29,14 +29,19 @@ spec: description: ValidatingPolicy is the resource that contains the policy definition. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object diff --git a/pkg/data/crds/json.kyverno.io_validatingpolicies.yaml b/pkg/data/crds/json.kyverno.io_validatingpolicies.yaml index 1ec7685d..a083678f 100644 --- a/pkg/data/crds/json.kyverno.io_validatingpolicies.yaml +++ b/pkg/data/crds/json.kyverno.io_validatingpolicies.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.14.0 name: validatingpolicies.json.kyverno.io spec: group: json.kyverno.io @@ -20,14 +20,19 @@ spec: description: ValidatingPolicy is the resource that contains the policy definition. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object