-
Notifications
You must be signed in to change notification settings - Fork 6.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
docs: add some complete samples for node_labels and dynamic vars render by inventory group #11806
base: master
Are you sure you want to change the base?
Conversation
…er by inventory group
Hi @kelein. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
/ok-to-test |
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.
/label ci-short
/retest
@@ -27,6 +30,15 @@ containerd_additional_runtimes: [] | |||
# engine: "" | |||
# root: "" | |||
|
|||
# Example for Nvidia as additional runtime: | |||
# containerd_additional_runtimes: |
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.
scrap this line and indent the rest as the example above for Kata
# Also you can dynamic set container runtime by ansible inventory group | ||
# containerd_default_runtime: "{{ 'nvidia' if inventory_hostname in groups['nvidia_gpu_nodes'] else 'runc' }}" | ||
|
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 is wrong advice, this is the kind of settings which should go in a group_vars/nvidia_gpu_nodes.yml
in your inventory instead.
# nvidia_gpu_nodes: | ||
# - kube-gpu-001 | ||
## Dynamic render gpu node list via ansible inventory group. | ||
# nvidia_gpu_nodes: "{{ groups['nvidia_gpu_nodes'] | list }}" | ||
|
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.
You can drop this, the nvidia_gpu_nodes which only reflect the groups is a bad idea and will be deleted eventually.
Example of `node_labels` definition in `inventory.ini` format: | ||
|
||
```toml |
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.
Can't be toml and ini ^.
Also, IMO that kind of vars is much more readable in yaml.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kelein The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind documentation
What this PR does / why we need it:
node_labels
var defination to label or taint nodescontainerd_default_runtime
var by inventory groupcontainerd_additional_runtimes
of nvidianvidia_gpu_nodes
var by inventory group'Which issue(s) this PR fixes:
NONE
Special notes for your reviewer:
node_labels
definationcontainerd_default_runtime
nvidia_gpu_nodes
varDoes this PR introduce a user-facing change?: