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 #11788

Closed
wants to merge 0 commits into from

Conversation

kelein
Copy link

@kelein kelein commented Dec 12, 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'
  5. Change local_release_dir var with kube_version suffix

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. labels Dec 12, 2024
Copy link

linux-foundation-easycla bot commented Dec 12, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Dec 12, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @kelein!

It looks like this is your first PR to kubernetes-sigs/kubespray 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kubespray has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 12, 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.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Dec 12, 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.

/ok-to-test
/label ci-short

Comment on lines 62 to 69
[kube_control_plane:vars]
node_labels={"node-role.kubernetes.io/master":"yes","role":"master"}

[common_cpu_nodes:vars]
node_labels={"node-role.kubernetes.io/worker":"yes","role":"worker","gpu":"no"}

[nvidia_gpu_nodes:vars]
node_labels={"node-role.kubernetes.io/worker":"yes","role":"worker","gpu":"yes"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should rather be in as a comment in the default section where node_labels is defined.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have write a example in docs/ansible/vars.md to describe how to set labels in inventory.ini format, do this way feasible ?

Comment on lines 45 to 57
[kube_node:children]
common_cpu_nodes
nvidia_gpu_nodes


[common_cpu_nodes]
node6
node7


[nvidia_gpu_nodes]
node4
node5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvidia_gpu_nodes are a pretty specific usecases, which should not be in the basic example inventory.

@@ -21,7 +21,7 @@ kube_version: v1.31.3

# Where the binaries will be downloaded.
# Note: ensure that you've enough disk space (about 1G)
local_release_dir: "/tmp/releases"
local_release_dir: "/tmp/releases-{{ kube_version }}"
# Random shifts for retrying failed ops like pushing/downloading
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a specific reason for this ? Does not seem needed

Copy link
Author

@kelein kelein Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have installed k8s with different version many times which the local release dir stored so many binary files of many version. Just only applies to my scene, I had rollback this change.

inventory/sample/group_vars/all/containerd.yml Outdated Show resolved Hide resolved
@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. ci-short Run a quick CI pipeline do-not-merge/contains-merge-commits size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 13, 2024
@kelein kelein requested a review from VannTen December 17, 2024 03:58
@VannTen
Copy link
Contributor

VannTen commented Dec 17, 2024 via email

@k8s-ci-robot
Copy link
Contributor

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

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 18, 2024
@kelein
Copy link
Author

kelein commented Dec 18, 2024

You'll need to remove your merge commit by rebasing as indicated by the CI robot.

@VannTen Thanks for your review, I had reopen it in #11806. 🤝

@VannTen
Copy link
Contributor

VannTen commented Dec 18, 2024 via email

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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants