-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Pruning for Custom Resources #2332
Comments
#2331 created for migrating the old keps into new template. |
/sig api-machinery |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-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. |
Enhancement Description
One-line enhancement description (can be used as a release note): Pruning for Custom Resources
Kubernetes Enhancement Proposal:
CustomResources store arbitrary JSON data without following the typical Kubernetes API behaviour to prune unknown fields. This makes CRDs different, but also leads to security and general data consistency concerns because it is unclear what is actually stored in etcd.
This KEP proposes to add pruning of all fields which are not specified in the OpenAPI validation schemas given in the CRD.
Pruning will be opt-in in v1beta1 of
apiextensions.k8s.io
viai.e. CRDs created in v1beta1 default to disabled pruning.
Pruning will be enabled for every CRD created in v1 and we will hide
preserveUnknownFields
in v1 in that case.Pruning can be disabled for subtrees of CustomResources by setting the
x-kubernetes-preserve-unknown-fields: true
vendor extension. This allows to store arbitrary JSON or RawExtensions. This will even be possible at the root level, even in v1. Adding that in every to each object in a schema leads to the old behaviour.Pruning requires structural schemas (as described in KEP Vanilla OpenAPI Subset: Structural Schema) for all defined versions. Validation will reject the CRD with
preserveUnknownFields: false
otherwise.Discussion Link:
Primary contact (assignee): @sttts
Responsible SIGs: sig-api-machinery
Enhancement target (which target equals to which milestone):
Alpha
k/enhancements
) update PR(s):k/k
) update PR(s):k/website
) update PR(s):Please keep this description up to date. This will help the Enhancement Team to track the evolution of the enhancement efficiently.
The text was updated successfully, but these errors were encountered: