-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Per Feature Feature Flags #5632
Comments
One though I just had - per TEP-033, fields that are behind an alpha/beta flag can be gradually transitioned from alpha to beta to GA. For features that are not controlled by a field, TEP-033 says they should have their own flag. But I do not think it is possible to move them gradually from alpha to beta to GA and instead they must either be enabled or disabled within a particular API version |
comment for tracking this issue |
I encounter this issue when implementing trusted resources in #5581 |
@chuangw6 also mentioned the same thing for his ConfigSource status field proposal |
Thanks @dibyom. This is a good idea. |
To give extra background, the reason we decided to have a single flag instead of per-feature ones is the amount of testing that that would require, because while features are (often) clearly separated from one another at the API level, they may be more intertwined in the controller code - so enabling one feature out of 10 may behave differently from enabling all 10. The alternative to feature flags (whether per feature or just one) would be to create About k8s feature flags, I may be wrong but I think they mainly relate to back-end behaviour, even though there is no clear distinction documented like for Tekton. If we decide to have feature-specific flags for all features, we shall document the test strategy. I believe each feature should then come with a dedicated set of e2e tests (like today) to be executed in an environment with only that feature enabled. |
I agree, the testing story is complicated but I don't think that by itself should be why we should only have a single flag. The most common use case for alpha features is to try out a single alpha feature, not all of them altogether. Feature flags implementations being intertwined is not great either - wherever possible a feature flag should only control the behavior of that specific feature and nothing else. I agree this can be tricky - K8s checks for this sort of thing in their Production Readiness Reviews - we could do something similar and have some guidelines to specifically check for this when adding a new feature gate. From a testing standpoint I think a reasonable option is to test will all feature flags on and all of them off (like we do today). We can document this and users who turn on only a subset of the flags can be responsible for their own testing.
In theory yes, but I think the complexity involved in maintaining N active API versions is far greater than just having feature flags (e.g. there can only be one api version that is stored so that version has to be able to represent info from all N API versions)
I think many of the feature gates are for backend features but there also user facing ones such as the PodSecurity one that gates the new PodSecurityAdmission feature which replaces PodSecurityPolicies
💯 . I'm not sure if it is realistic to test every combination of flags but we can definitely clearly state what we test and users who use a different subset of flags can be responsible for their own testing. That being said, I do think we should do our best to make sure a feature gate is only scoped to that particular feature.
Agreed! |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
@tekton-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I wanted to share this doc with some thoughts from a k8s maintainer on some of the issues they've run into w/ per-feature flags. A lot of it is related to rollbacks which I think we've been less concerned about than k8s has. To make rollbacks easier, they drop unsupported fields rather than rejecting CRDs containing them, as we do. I still think we should implement per-feature flags, but this doc could help us understand what issues we might run into. The issues are basically:
|
Looks like we can also close this with the completion of #7090 at v0.53.0 milestone. |
Feature request
TEP-033 proposed an
enable-api-fields
flag for features that require an API field. This allows us to group and enable/disable all "alpha"/"beta" features together.An alternative approach is having a way to enable/disable each feature by via its own flag (such as the approach taken by Kubernetes feature gates)
This issue is for tracking experimentation for per feature feature gates.
Use case
The text was updated successfully, but these errors were encountered: