-
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
Support Kubernetes style feature-gates for new API fields #3459
Comments
Interesting extract of the docAn API change is considered compatible if it:
Put another way:
|
About "Adding Unstable Features to Stable Versions", there is 2 options described in the document Alpha field in existing API versionThe preferred approach adds an alpha field to the existing object, and ensures it is disabled by default: It has to be Before persisting the object to storage, clear disabled alpha fields on create, and on update if the existing object does not already have a value in the field. This prevents new usage of the feature while it is disabled, while ensuring existing data is preserved. Ensuring existing data is preserved is needed so that when the feature is enabled by default in a future version n and data is unconditionally allowed to be persisted in the field, an n-1 API server (with the feature still disabled by default) will not drop the data on update.
New alpha API versionThe latter requires that all objects in the same API group as I feel this definitely make sense and we could adopt something similar/close to that. We already have the "feature gate" notion (and configmap), we would just need to formalize it better, in a document and in code. This is not that far from what we are doing right now, except that, for any new field added, we would require a feature-flag to be disabled by default and that could be enable later in time. This would be something to do for Custom Tasks, future of PipelineResource (if any), and would have been useful to do for finally task, when experssion… I definitely like this approach and I feel we need this. It make adding a new feature (field, type, …) a little bit cumbersome, but with proper documentation and code helpers, it shouldn't be that bad — and it's at the benefit of the users. So 👍 on this. Note: This should be something that applies to any tektoncd component that defines CRD, be /cc @tektoncd/core-maintainers |
/assign @afrittoli |
Related proposal in kubebuilder to add support for feature gates as part of their controller framework: kubernetes-sigs/kubebuilder#849 |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
We want this for v1 and there's a TEP in progress at tektoncd/community#280 /lifecycle frozen |
@afrittoli @skaegi Looks like this work is complete; should this be closed? |
I'm going to close this as TEP-0033 Tekton Feature Gates has been implemented. /close |
@sbwsg: 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. |
Some of the Tekton objects are now "beta" and hopeful "stable" in the not too distant future. When doing work in the API WG we should not be immediately graduating any new fields added to "beta" or whatever degree of stability the CRD currently is. Instead we should provide a mechanism for them to go through some sort of Alpha state until we're sure they work well.
The alternative is that we'll be forced to retain backwards compatibility with mistakes we might be able to catch with real world use before the feature is promoted to beta or stable.
--
What I'm hoping for is a little pre-discussion before I create a concrete TEP. What I'm looking at is the use of techniques from Kubernetes sig-architure like -- https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api_changes.md#adding-unstable-features-to-stable-versions . The idea being that (when possible) you add new feature fields as optional fields that use feature-gates to prevent their use based on the associated feature flag setting.
This issue is specifically targeting the addition of new fields as that currently is the critical problem, however we should also consider applying feature-flags in Tekton to new CRDs.
The text was updated successfully, but these errors were encountered: