-
Notifications
You must be signed in to change notification settings - Fork 216
Allow overrides for components #30
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
Allow overrides for components #30
Conversation
Making CLusterID a string type allows makes the config better in terms of human readble. Added the UnmarshalJSON for string CLusterID with validations that ensure that uuid type. This does not prevent users from setting wrong uuid type, but CRDs don't allow high level validation server side. CVO will not use invalid uuid.
component override allow user to make one of the CVO's owned component unmanaged. More overrides like JSON merge patch can be added later.
|
/retest |
| return fmt.Errorf("invalid ClusterID %q, must be an RFC4122-variant UUID: found %s", strid, uid.Variant()) | ||
| } | ||
| if uid.Version() != 4 { | ||
| return fmt.Errorf("Invalid ClusterID %q, must be a version-4 UUID: found %s", strid, uid.Version()) |
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.
Wait, why do we care about the UUID version?
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.
cincinnati cares about it. And CVO needs to only use that specific version of uuid to successfully talk to cincinnati
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.
We are banking on the fact that V4 UUIDs are random so that we can key on this when doing rate-limited updates.
| if ov.Kind == kind && | ||
| (namespace == "" || ov.Namespace == namespace) && // cluster-scoped objects don't have namespace. | ||
| ov.Name == name { | ||
| return overrides[idx], true |
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.
Why overrides[idx] instead of ov?
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.
Don't like using the value from range for anything other than reading....
|
/retest |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, crawford The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Making CLusterID a string type allows makes the config better in
terms of human readble.
Added the UnmarshalJSON for string CLusterID with validations that
ensure that uuid type.
This does not prevent users from setting wrong uuid type, but CRDs
don't allow high level validation server side. CVO will not use invalid
uuid.
component override allow user to make one of the CVO's owned component
unmanaged.
More overrides like JSON merge patch can be added later.