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

Regenerate CRDs using controller-gen v0.9.2 #105

Merged
merged 2 commits into from
Dec 4, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 2 additions & 8 deletions config/crd/bases/services.k8s.aws_adoptedresources.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

Copy link
Member

Choose a reason for hiding this comment

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

The real real problem here is the controller-gen version we used to generate those files (v0.7.0) - Check line 7 in both files. This bug was fixed in v0.8.0 (PR kubernetes-sigs/controller-tools#517).
Can please regenerate these file using v0.9.2 ? it's the version we use for the generated controller now.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, not sure I fully understand: I'm using aws-controllers-k8s/code-generator@20e82a5 with aws-controllers-k8s/runtime@007e038 (i.e. latest) to generate the files. From the tags those commits are way ahead of v0.[8|9].x?

Copy link
Member Author

@embano1 embano1 Dec 3, 2022

Choose a reason for hiding this comment

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

And the weird thing is that the other service-related CRDs are created without the newline, i.e. only these two common files are somehow affected.

Copy link
Member

Choose a reason for hiding this comment

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

Yep the service related CRD are generated using controller-gen v0.9.2 - the common CRDs were generated long time ago using v0.7.0.
The thing is that CRD files are generated using controller-gen not ack-generate.

Script that build service related CRDs: https://github.com/aws-controllers-k8s/code-generator/blob/main/scripts/build-controller.sh#L196-L200
Script that build common CRDs: https://github.com/aws-controllers-k8s/runtime/blob/main/scripts/build-apis.sh#L20-L22

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: adoptedresources.services.k8s.aws
spec:
Expand Down Expand Up @@ -170,6 +169,7 @@ spec:
- name
- uid
type: object
x-kubernetes-map-type: atomic
type: array
type: object
required:
Expand Down Expand Up @@ -224,9 +224,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
9 changes: 1 addition & 8 deletions config/crd/bases/services.k8s.aws_fieldexports.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: fieldexports.services.k8s.aws
spec:
Expand Down Expand Up @@ -133,9 +132,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []