-
Notifications
You must be signed in to change notification settings - Fork 14.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
Update CRD defaulting docs for GA #17450
Merged
k8s-ci-robot
merged 1 commit into
kubernetes:dev-1.17
from
sttts:sttts-crd-defaulting-ga
Nov 22, 2019
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -628,7 +628,7 @@ Additionally, the following restrictions are applied to the schema: | |
|
||
These fields can only be set with specific features enabled: | ||
|
||
- `default`: can be set for `apiextensions.k8s.io/v1` CustomResourceDefinitions. Defaulting is in beta since 1.16 and requires the `CustomResourceDefaulting` feature gate to be enabled (which is the case automatically for many clusters for beta features). Compare [Validation Schema Defaulting](/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions/#defaulting). | ||
- `default`: can be set for `apiextensions.k8s.io/v1` CustomResourceDefinitions. Defaulting is in GA since 1.17 (beta since 1.16 with the `CustomResourceDefaulting` feature gate to be enabled, which is the case automatically for many clusters for beta features). Compare [Validation Schema Defaulting](/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions/#defaulting). | ||
|
||
Note: compare with [structural schemas](#specifying-a-structural-schema) for further restriction required for certain CustomResourceDefinition features. | ||
|
||
|
@@ -781,10 +781,10 @@ crontab "my-new-cron-object" created | |
|
||
### Defaulting | ||
|
||
{{< feature-state state="beta" for_kubernetes_version="1.16" >}} | ||
{{< feature-state state="stable" for_kubernetes_version="1.17" >}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The preview shows the version at 1.16 -- seems odd. Perhaps a problem with netlify. |
||
|
||
{{< note >}} | ||
Defaulting is available as beta since 1.16 in `apiextensions.k8s.io/v1` CustomResourceDefinitions, and hence enabled by default for most clusters (feature gate `CustomResourceDefaulting`, refer to the [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) documentation). | ||
To use defaulting, your CustomResourceDefinition must use API version `apiextensions.k8s.io/v1`. | ||
{{< /note >}} | ||
|
||
Defaulting allows to specify default values in the [OpenAPI v3 validation schema](#validation): | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do you prefer this wording:
?
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.
No, the suggested sentence is wrong. In GA and in beta it is enabled by default. In GA you cannot disable it.
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.
Hello @sttts, line 631 is a bit difficult to parse.
Question:
How does
Defaulting
compare toValidation Schema Defaulting
found in the section named Defaulting below?Suggested rewording:
default
: can be set forapiextensions.k8s.io/v1
CustomResourceDefinitions. Defaulting is in GA since v1.17. TheCustomResourceDefaulting
feature gate is enabled automatically (which is the default case for many clusters for beta features) starting with beta v1.16. Compare to [Validation ...