From b7d68c05248fed09bd0758759f70293b104f43ca Mon Sep 17 00:00:00 2001 From: Marco Voelz Date: Thu, 8 Sep 2022 15:08:16 +0200 Subject: [PATCH 1/3] Update controller-gen to latest and use go install --- vertical-pod-autoscaler/hack/generate-crd-yaml.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vertical-pod-autoscaler/hack/generate-crd-yaml.sh b/vertical-pod-autoscaler/hack/generate-crd-yaml.sh index 23aa66e9b85c..e45d229659ec 100755 --- a/vertical-pod-autoscaler/hack/generate-crd-yaml.sh +++ b/vertical-pod-autoscaler/hack/generate-crd-yaml.sh @@ -19,7 +19,7 @@ set -o nounset set -o pipefail REPOSITORY_ROOT=$(realpath $(dirname ${BASH_SOURCE})/..) -CRD_OPTS=crd:trivialVersions=false,allowDangerousTypes=true +CRD_OPTS=crd:allowDangerousTypes=true APIS_PATH=${REPOSITORY_ROOT}/pkg/apis OUTPUT=${REPOSITORY_ROOT}/deploy/vpa-v1-crd-gen.yaml WORKSPACE=$(mktemp -d) @@ -32,8 +32,7 @@ trap cleanup EXIT if [[ -z $(which controller-gen) ]]; then ( cd $WORKSPACE - go mod init tmp - go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.0 + go install sigs.k8s.io/controller-tools/cmd/controller-gen@latest ) CONTROLLER_GEN=${GOBIN:-$(go env GOPATH)/bin}/controller-gen else From c50c8ad9efd82af82623af384533f2e75dfcbdc2 Mon Sep 17 00:00:00 2001 From: Marco Voelz Date: Thu, 8 Sep 2022 15:09:51 +0200 Subject: [PATCH 2/3] Run hack/generate-crd-yaml.sh --- .../deploy/vpa-v1-crd-gen.yaml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/vertical-pod-autoscaler/deploy/vpa-v1-crd-gen.yaml b/vertical-pod-autoscaler/deploy/vpa-v1-crd-gen.yaml index 72b08bfb7b11..782ddb791293 100644 --- a/vertical-pod-autoscaler/deploy/vpa-v1-crd-gen.yaml +++ b/vertical-pod-autoscaler/deploy/vpa-v1-crd-gen.yaml @@ -3,7 +3,7 @@ kind: CustomResourceDefinition metadata: annotations: api-approved.kubernetes.io: https://github.com/kubernetes/kubernetes/pull/63797 - controller-gen.kubebuilder.io/version: v0.4.0 + controller-gen.kubebuilder.io/version: v0.9.2 creationTimestamp: null name: verticalpodautoscalercheckpoints.autoscaling.k8s.io spec: @@ -203,19 +203,13 @@ spec: type: object served: true storage: false -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: api-approved.kubernetes.io: https://github.com/kubernetes/kubernetes/pull/63797 - controller-gen.kubebuilder.io/version: v0.4.0 + controller-gen.kubebuilder.io/version: v0.9.2 creationTimestamp: null name: verticalpodautoscalers.autoscaling.k8s.io spec: @@ -378,6 +372,7 @@ spec: - kind - name type: object + x-kubernetes-map-type: atomic updatePolicy: description: Describes the rules on how changes are applied to the pods. If not specified, all fields in the `PodUpdatePolicy` are @@ -617,6 +612,7 @@ spec: - kind - name type: object + x-kubernetes-map-type: atomic updatePolicy: description: Describes the rules on how changes are applied to the pods. If not specified, all fields in the `PodUpdatePolicy` are @@ -749,9 +745,3 @@ spec: type: object served: true storage: false -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] From 96da70005495143154fd2b15c95059ba386abcaf Mon Sep 17 00:00:00 2001 From: Marco Voelz Date: Wed, 14 Sep 2022 11:31:39 +0200 Subject: [PATCH 3/3] Pin controller-gen to 0.9.2 --- vertical-pod-autoscaler/hack/generate-crd-yaml.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vertical-pod-autoscaler/hack/generate-crd-yaml.sh b/vertical-pod-autoscaler/hack/generate-crd-yaml.sh index e45d229659ec..0c98476ead95 100755 --- a/vertical-pod-autoscaler/hack/generate-crd-yaml.sh +++ b/vertical-pod-autoscaler/hack/generate-crd-yaml.sh @@ -32,7 +32,7 @@ trap cleanup EXIT if [[ -z $(which controller-gen) ]]; then ( cd $WORKSPACE - go install sigs.k8s.io/controller-tools/cmd/controller-gen@latest + go install sigs.k8s.io/controller-tools/cmd/controller-gen@0.9.2 ) CONTROLLER_GEN=${GOBIN:-$(go env GOPATH)/bin}/controller-gen else