-
Notifications
You must be signed in to change notification settings - Fork 236
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
feat: Promote WorkstationConfig to v1beta1 #3412
feat: Promote WorkstationConfig to v1beta1 #3412
Conversation
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.
/lgtm
/approve
/hold
one nit, but a blocker. Feel free to unhold and fix in follow-up PRs.
// Parent is a reference to the parent WorkstationCluster for this WorkstationConfig. | ||
Parent *WorkstationClusterRef `json:"parentRef"` | ||
|
||
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" |
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.
nit: can we remove this immutable checker? This field has been guardrailed in the Identity and adding the CEL immutability check here will leave the KCC object unfixable in certain situations.
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 CEL immutability check here will leave the KCC object unfixable in certain situations.
I am not sure that I understand this. What situation would this be a problem? Also, the CEL check is still in the template:
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ResourceID field is immutable" |
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.
Yeah, we should clean up the template as well. Basically this field has been guarded by the resource identity function (check spec.project match externalref.project, spec.location matches externalref.location, and id matches the externalRefid). If adding the immutable check in CRD level, certain situations may not work as expected and confuse users. .e.g. user use the default metadata.name (spec.resourceID empty) to create the object, and later on want to set the spec.resourceID, the CEL check fails because nil -> string is considered as a mutable change.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yuwenma 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 |
5d08840
to
05e927e
Compare
/lgtm |
/hold cancel |
0249649
into
GoogleCloudPlatform:master
No description provided.