Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update controller-gen to 0.9.2 #5178

Merged
merged 3 commits into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions vertical-pod-autoscaler/deploy/vpa-v1-crd-gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -203,19 +203,13 @@ spec:
type: object
served: true
storage: false
status:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why regenerating deletes this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was accepted as a bug some time ago: kubernetes-sigs/controller-tools#456 and fixed from version 0.9.0 with kubernetes-sigs/controller-tools#630

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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -749,9 +745,3 @@ spec:
type: object
served: true
storage: false
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
5 changes: 2 additions & 3 deletions vertical-pod-autoscaler/hack/generate-crd-yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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/[email protected]
go install sigs.k8s.io/controller-tools/cmd/[email protected]
)
CONTROLLER_GEN=${GOBIN:-$(go env GOPATH)/bin}/controller-gen
else
Expand Down