-
Notifications
You must be signed in to change notification settings - Fork 65
Add kubebuilder markers to CRDs for status and namespace #117
Conversation
Signed-off-by: Vince Prignano <[email protected]>
/assign @chuckha @fabriziopandini |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! @vincepri
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini, vincepri The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -49,6 +49,9 @@ type KubeadmConfigStatus struct { | |||
} | |||
|
|||
// +kubebuilder:object:root=true | |||
// +kubebuilder:resource:path=kubeadmconfigs,scope=Namespaced | |||
// +kubebuilder:storageversion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have conversion enabled?
what does this do when conversion is not enabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think setting it proactively will help when we do enable conversions in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The storageversion serves for conversion and for future version iterations. Other CAP* projects specify this field as well
@@ -49,6 +49,9 @@ type KubeadmConfigStatus struct { | |||
} | |||
|
|||
// +kubebuilder:object:root=true | |||
// +kubebuilder:resource:path=kubeadmconfigs,scope=Namespaced |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespaced
is the default if I'm reading https://book.kubebuilder.io/reference/markers/crd.html correctly. I don't really know what this is doing otherwise. Why do we need it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually not, it'll default to empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh that's fun
Signed-off-by: Vince Prignano [email protected]
What this PR does / why we need it:
This PR adds kubebuilder directives to
KubeadmConfig
to ensure:Status
subresource.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
Release note: