Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kelein
Copy link

@kelein kelein commented Dec 18, 2024

What type of PR is this?
/kind documentation

What this PR does / why we need it:

  1. Add example for node_labels var defination to label or taint nodes
  2. Add example for dynamic render containerd_default_runtime var by inventory group
  3. Add example for containerd_additional_runtimes of nvidia
  4. Add example for dynamic render nvidia_gpu_nodes var by inventory group'

Which issue(s) this PR fixes:
NONE

Special notes for your reviewer:

  • sample for node_labelsdefination
  • sample for dynamic set containerd_default_runtime
  • sample for dynamic set nvidia_gpu_nodes var

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/documentation Categorizes issue or PR as related to documentation. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 18, 2024
@k8s-ci-robot
Copy link
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@yankay
Copy link
Member

yankay commented Dec 24, 2024

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 24, 2024
Copy link
Contributor

@VannTen VannTen left a 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:
Copy link
Contributor

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

Comment on lines +11 to +13
# 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' }}"

Copy link
Contributor

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.

Comment on lines -318 to +320
# nvidia_gpu_nodes:
# - kube-gpu-001
## Dynamic render gpu node list via ansible inventory group.
# nvidia_gpu_nodes: "{{ groups['nvidia_gpu_nodes'] | list }}"

Copy link
Contributor

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.

Comment on lines +261 to +263
Example of `node_labels` definition in `inventory.ini` format:

```toml
Copy link
Contributor

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.

@k8s-ci-robot k8s-ci-robot added the ci-short Run a quick CI pipeline label Jan 7, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kelein
Once this PR has been reviewed and has the lgtm label, please assign mzaian for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-short Run a quick CI pipeline cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/documentation Categorizes issue or PR as related to documentation. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants