-
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
improve detail of podtolerationrestriction behavior #7135
improve detail of podtolerationrestriction behavior #7135
Conversation
Deploy preview for kubernetes-io-master-staging ready! Built with commit 2dcf4b2 https://deploy-preview-7135--kubernetes-io-master-staging.netlify.com |
docs/admin/admission-controllers.md
Outdated
1. First, the default tolerations for a given namespace are determined: | ||
|
||
i. If the namespace contains an annotation with the key `scheduler.alpha.kubernetes.io/default-tolerations` | ||
and a non-empty, the value of the annotation will be considered as the default tolerations for the namespace. |
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.
"and a non-empty"?
docs/admin/admission-controllers.md
Outdated
and a non-empty, the value of the annotation will be considered as the default tolerations for the namespace. | ||
|
||
ii. If the namespace lacks an annotation with the key `scheduler.alpha.kubernetes.io/default-tolerations`, then | ||
the cluster defaults will be used as the default tolerations for the namespace. |
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.
Reads will ask "what are the cluster defaults? how to set these defaults?"
docs/admin/admission-controllers.md
Outdated
`scheduler.alpha.kubernetes.io/tolerationsWhitelist` | ||
annotation keys. | ||
This admission controller defaults and limits what tolerations may be used on Pods in a given namespace. | ||
The plugin will build a list of defaults, and a whitelist of allows tolerations based on annotations on the namespace. |
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.
allows -> allowed
docs/admin/admission-controllers.md
Outdated
When the namespace does not specify a whitelist, the namespace-specifc whitelist from the plugin configuration are used. | ||
|
||
**Note:** If the annotations are specified, but empty, they are considered to override the cluster-level defaults. | ||
{: .note} |
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.
👍
docs/admin/admission-controllers.md
Outdated
value: value1 | ||
- key: key2 | ||
value: value2 | ||
``` |
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.
line 541-551 should be unindented
docs/admin/admission-controllers.md
Outdated
|
||
PodTolerationRestriction uses a configuration file to define: | ||
|
||
1. A cluster-wide default node selector (this is used if the `` annotation is not present on the target Namespace) |
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.
Looks like this line won't format correctly.
What did you mean by "`` annotation" ?
docs/admin/admission-controllers.md
Outdated
|
||
1. A cluster-wide default node selector (this is used if the `` annotation is not present on the target Namespace) | ||
|
||
2. Namespace-specific default whitelists (these are used if the `` annotation is not present on the target Namespace) |
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.
here too
docs/admin/admission-controllers.md
Outdated
2. Namespace-specific default whitelists (these are used if the `` annotation is not present on the target Namespace) | ||
|
||
Note that the configuration file format will move to a versioned file in a future release. | ||
This file may be json or yaml and has the following format: |
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.
use "JSON or YAML" when appropriate
docs/admin/admission-controllers.md
Outdated
|
||
#### Internal Logic | ||
|
||
1. Determine the `Pod`'s effective tolerations: |
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 need to add "`" around Pod here?
Also no need to add it around Namespace blow.
/assign @tengqm |
@colemickens if this targets the 1.10 release, could you retarget this PR against the |
@colemickens see comment ^^ from Joe Heck about retargeting against the |
The changes didn't merge. I'll rebase and retarget for 1.11. |
/hold waiting on 1.11 branch for docs, which we don't want to create yet. Too much churn with merging master. |
@colemickens 👋 1.11 release branch is open; changing base to 1.11. |
2231db1
to
7a66f56
Compare
7a66f56
to
2fae1ff
Compare
2fae1ff
to
a9e0792
Compare
@MistyHacks This PR will be affected by any changes to |
2dcf4b2
to
6255030
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Deploy preview for kubernetes-io-vnext-staging ready! Built with commit 6255030 https://deploy-preview-7135--kubernetes-io-vnext-staging.netlify.com |
The underlying structure of the docs repository has changed due to the recent If you were using Github's web UI rather than a local Git client, you can stop If you use the Git command-line client, you will need to make sure your local Assuming your your fork's remote is called git fetch origin; git reset --hard origin/podtolerationrestriction-docs If you didn't have local commits, you're now ready to keep working on this PR If you did have local commits, cherry-pick them from oldest to newest. For git cherry-pick <HASH> You will need to resolve conflicts in these cherry-picked commits, which
When you've cherry-picked all local commits back onto the local branch, push the |
/no-hold @tengqm @xiangpengzhao please re-review. |
/hold cancel |
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 left some comments. All links need to be updated to the new structure where everything is under /content/en/docs/
instead of /docs/
. Admonitions need to be updated to use Hugo shortcodes. I found some typos and formatting problems too. Others should be nominated for technical review of the content.
```shell | ||
kube-apiserver --disable-admission-plugins=PodNodeSelector,AlwaysDeny ... | ||
``` | ||
{: .note} |
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.
Please modify this to use the Hugo short-code. See https://kubernetes.io/docs/test/#admonitions or its source code at https://raw.githubusercontent.com/kubernetes/website/master/content/en/docs/test.md.
|
||
Rejects all requests. AlwaysDeny is DEPRECATED as no real meaning. | ||
Rejects all requests. Used for testing. |
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.
Please remove all double spacing from the file.
@@ -140,9 +134,11 @@ enabling this admission controller. | |||
|
|||
### EventRateLimit (alpha) | |||
|
|||
This admission controller mitigates the problem where the API server gets flooded by | |||
This admission controller is introduced in v1.9 to mitigate the problem where the API server gets flooded by |
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.
Is it necessary to specify the version? That version will be n-2 when 1.11 ships.
@@ -184,16 +180,19 @@ for more details. | |||
|
|||
### ExtendedResourceToleration | |||
|
|||
This plug-in facilitates creation of dedicated nodes with extended resources. | |||
This plug-in is introduced in v1.9 to facilitate creation of dedicated nodes with extended resources. |
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.
Same concern as above wrt mentioning a version.
@@ -316,23 +314,24 @@ In any case, the annotations are provided by the user and are not validated by K | |||
|
|||
### Initializers (alpha) | |||
|
|||
This admission controller is introduced in v1.7. |
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.
Again, is the version relevant? 1.7 will be the oldest supported version when 1.11 ships, if I understand it correctly.
If the pod's namespace does not have any associated default or whitelist of | ||
tolerations, then the cluster-level default or whitelist of tolerations are used | ||
instead if specified. | ||
2. Namespace-specific default whitelists (these are used if the `` annotation is not present on the target Namespace) |
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.
As above.
`scheduler.alpha.kubernetes.io/defaultTolerations` and | ||
`scheduler.alpha.kubernetes.io/tolerationsWhitelist` | ||
annotation keys. | ||
Note that the configuration file format will move to a versioned file in a future release. |
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.
s/Note that//
`scheduler.alpha.kubernetes.io/tolerationsWhitelist` | ||
annotation keys. | ||
Note that the configuration file format will move to a versioned file in a future release. | ||
This file may be json or yaml and has the following format: |
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.
If JSON or YAML are both allowed, why not have a JSON example too?
plugins: | ||
- name: PodTolerationRestriction | ||
path: podtolerationrestriction.yaml | ||
... |
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.
Is it possible to include a complete and usable YAML example instead of the ellipses?
@@ -582,7 +622,7 @@ fails. This admission controller only runs in the validation phase; the webhooks | |||
mutate the object, as opposed to the webhooks called by the `MutatingAdmissionWebhook` admission controller. | |||
|
|||
If a webhook called by this has side effects (for example, decrementing quota) it | |||
*must* have a reconciliation system, as it is not guaranteed that subsequent | |||
*must* have a reconcilation system, as it is not guaranteed that subsequent |
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.
Revert introduced typo here.
I was wrong about the need to change /docs/ to /content/en/docs/ so you can ignore the request to do that. The things about Hugo shortcodes still need to be addressed. |
@MistyHacks This doc change is dependent on PRs that are stalled out and are not actively being worked on. Additionally, much of the feedback provided applies to sections of the Admin Controllers document that this PR was not meant to address. I think it would probably be a good idea to open a new tracking issue for the various other Hugo/etc changes that are needed to this document. (If the PRs ever proceed, I will certainly incorporate the feedback you left for the PTR/PNS controllers.) |
@@ -9,7 +9,8 @@ reviewers: | |||
title: Using Admission Controllers | |||
--- | |||
|
|||
{{< toc >}} |
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.
This needs to be put back.
@@ -1,5 +1,5 @@ | |||
--- | |||
reviewers: |
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.
This needs to be reverted.
@colemickens The Hugo problems in this PR are already fixed in the |
Also I see that the upstream PR this PR depends upon has been closed without merging. Does that mean this one should be closed too? |
Yes, I am going to close it. The things that looked like me undoing the Hugo updates should've gone away on their own, had I rebased my own changes, but given the current state, I'm not going to bother and will just close. |
Somewhat related: PR #18849 |
similar to #7134
This PR:
This targets
release-1.10
.This PR is dependent on this Kubernetes PR: kubernetes/kubernetes#58818
This change is