-
Notifications
You must be signed in to change notification settings - Fork 50
VEP 104: Allow disabling feature gates #105
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
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/cc @nunnatsa |
|
An option question: Do we need a feature gate for this change? I think it makes sense to not have a feature gate here for these reasons:
|
| ### Approach #1 - Use a `FeatureGateConfiguration` struct slice with an `Enabled` field | ||
|
|
||
| As part of this approach, a feature enablement is determined by its configuration in the new `kv.spec.configuration.featureGates` field. | ||
| This field is a slice of `FeatureGateConfiguration` objects which currently contain two fields, `name` and `enabled`: | ||
| ```go | ||
| type FeatureGateConfiguration struct { | ||
| Name string `json:"name"` | ||
| // Enabled indicates whether the feature gate is enabled or not. Defaults to true. | ||
| // +optional | ||
| Enabled *bool `json:"enabled,omitempty"` | ||
| } | ||
| ``` |
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 vote in favor of this approach BTW.
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.
Me too
Barakmor1
left a comment
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.
Thank you for taking the initiative to move this forward! Since we currently don’t have a way to disable feature gates, we cannot enable them by default. This affects the feature gate lifecycle and makes it harder to test beta feature gates at scale. That is why I believe this proposal is very important and should be a high priority.
Regarding the proposed solutions, I am fine with approach 1, and I am also okay with approach 4, even though it adds some parsing overhead that needs careful handling. Maintaining an extra API field for something as central as feature gates has a high cost, so this trade-off is worth considering.
| Name string `json:"name"` | ||
| // Enabled indicates whether the feature gate is enabled or not. Defaults to true. | ||
| // +optional | ||
| Enabled *bool `json:"enabled,omitempty"` |
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 wonder if we should make this string follow best practice conventions, even though the enabled field is only expected to have true or false values. What do you think?
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 wonder if we should make this string follow best practice conventions
By "best practices" you mean to define it as a struct instead of a bool? This is interesting.
On the hand this would make Enabled extendible, which is always nice. On the other hand, this makes a bit less human friendly syntax.
Let's see what others think, but I'm open to this approach 👍
lyarwood
left a comment
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 for pushing this forward as a VEP @iholder101, hopefully something we can agree on and land for v1.8.0.
|
Question about validation: Should the webhook validate the FG list? I can think about the following cases - should we address them?
Note: anyway, even if we want to validate FGs, IMHO, the result must be a warning, rather than an error. |
63728f2 to
cfc8d45
Compare
Adding validations, or enabling beta features by default, is out-of-scope for this VEP and should be addressed elsewhere. |
cfc8d45 to
9d979a1
Compare
Signed-off-by: Itamar Holder <[email protected]>
9d979a1 to
125e3bb
Compare
|
I've now added the following to the VEP:
|
VEP Metadata
Tracking issue: #104
SIG label: /sig compute
What this PR does
Allows to explicitly disable feature gates.
Special notes for your reviewer
VEP in a human readable format: https://github.com/iholder101/kubevirt-enhancements/blob/vep104/initial-vep-pr/veps/sig-compute/104_allow_disabling_feature_gates/vep.md.