Skip to content

Commit 2b62ae3

Browse files
dholtclaude
andcommitted
refactor: rename k8s inventory groups for kubespray v2.30
kubespray v2.30 requires underscored group names: - kube-master -> kube_control_plane - kube-node -> kube_node - k8s-cluster -> k8s_cluster Updated inventory templates, group_vars filename, group_vars content, and all playbook references. Directory paths (playbooks/k8s-cluster/) are unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Douglas Holt <dholt@nvidia.com>
1 parent 7f3c71c commit 2b62ae3

13 files changed

Lines changed: 35 additions & 35 deletions
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ dashboard_metrics_scrape_tagr: "v1.0.4"
4444
dashboard_metrics_scraper_repo: "kubernetesui/metrics-scraper"
4545

4646
# Ensure hosts file generation only runs across k8s cluster
47-
hosts_add_ansible_managed_hosts_groups: ["k8s-cluster"]
47+
hosts_add_ansible_managed_hosts_groups: ["k8s_cluster"]
4848

4949
# NFS Client Provisioner
5050
# Playbook: nfs-client-provisioner.yml

config.example/inventory

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
######
2020
# KUBERNETES
2121
######
22-
[kube-master]
22+
[kube_control_plane]
2323
#mgmt01
2424
#mgmt02
2525
#mgmt03
@@ -31,13 +31,13 @@
3131
#mgmt03
3232

3333
# Also add mgmt/master nodes here if they will run non-control plane jobs
34-
[kube-node]
34+
[kube_node]
3535
#gpu01
3636
#gpu02
3737

38-
[k8s-cluster:children]
39-
kube-master
40-
kube-node
38+
[k8s_cluster:children]
39+
kube_control_plane
40+
kube_node
4141

4242
######
4343
# SLURM

playbooks/bootstrap/bootstrap-openshift.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- hosts: kube-master
2+
- hosts: kube_control_plane
33
become: true
44
tasks:
55
- name: Install required Python OpenShift packages/libraries

playbooks/k8s-cluster.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
import_playbook: generic/hosts.yml
6969

7070
- name: Set up a local cluster container registry
71-
import_playbook: container/standalone-container-registry.yml hostlist=kube-master
71+
import_playbook: container/standalone-container-registry.yml hostlist=kube_control_plane
7272
when: kube_enable_container_registry|default(false)
7373

7474
# Install 'sshpass' program for: https://github.com/ansible/ansible/issues/56629
@@ -110,7 +110,7 @@
110110
environment: "{{proxy_env if proxy_env is defined else {}}}"
111111

112112
# Install Kubernetes
113-
# for configuration, see: config/group_vars/k8s-cluster.yml
113+
# for configuration, see: config/group_vars/k8s_cluster.yml
114114
- name: Install Kubernetes
115115
import_playbook: ../submodules/kubespray/cluster.yml
116116
tags:
@@ -128,7 +128,7 @@
128128
- swap
129129

130130
# Manage Kubernetes cluster access config file
131-
- hosts: k8s-cluster
131+
- hosts: k8s_cluster
132132
gather_facts: false
133133
vars:
134134
ansible_become: no
@@ -165,7 +165,7 @@
165165
- name: Install NVIDIA driver on GPU servers
166166
import_playbook: nvidia-software/nvidia-driver.yml
167167
vars:
168-
hostlist: "k8s-cluster"
168+
hostlist: "k8s_cluster"
169169
tags:
170170
- nvidia
171171
when: deepops_gpu_operator_enabled|default(true) | bool == false or
@@ -174,7 +174,7 @@
174174
- name: Install NVIDIA container runtime on GPU servers
175175
import_playbook: container/nvidia-docker.yml
176176
vars:
177-
hostlist: "k8s-cluster"
177+
hostlist: "k8s_cluster"
178178
tags:
179179
- nvidia
180180
when:
@@ -183,7 +183,7 @@
183183
- container_manager is defined and container_manager == "docker"
184184

185185
# Manage kubectl binary
186-
- hosts: kube-master
186+
- hosts: kube_control_plane
187187
gather_facts: false
188188
vars:
189189
ansible_become: no
@@ -196,7 +196,7 @@
196196
run_once: true
197197
tags:
198198
- local
199-
- hosts: k8s-cluster
199+
- hosts: k8s_cluster
200200
gather_facts: false
201201
vars:
202202
config_dir: "../config"
@@ -252,9 +252,9 @@
252252
tags:
253253
- local
254254

255-
# Remove taint from kube-master nodes.
255+
# Remove taint from kube_control_plane nodes.
256256
# This keeps backwards compatibility and allows a few services (monitoring/etc.) to run properly.
257-
- hosts: kube-master
257+
- hosts: kube_control_plane
258258
gather_facts: false
259259
vars:
260260
ansible_become: no
@@ -268,7 +268,7 @@
268268
- name: kubeadm | Remove taint for master with node role
269269
command: "{{ artifacts_dir }}/kubectl --kubeconfig {{ artifacts_dir }}/admin.conf taint node {{ inventory_hostname }} node-role.kubernetes.io/control-plane:NoSchedule-"
270270
delegate_to: localhost
271-
failed_when: false # Taint will not be present if kube-master also under kube-node
271+
failed_when: false # Taint will not be present if kube_control_plane also under kube_node
272272

273273
- name: Install k8s GPU feature discovery
274274
import_playbook: k8s-cluster/nvidia-k8s-gpu-feature-discovery.yml
@@ -295,11 +295,11 @@
295295
- name: Setup rsyslog server
296296
import_playbook: generic/rsyslog-server.yml
297297
vars:
298-
hostlist: "{{ rsyslog_server_hostname | default('kube-master[0]') }}"
298+
hostlist: "{{ rsyslog_server_hostname | default('kube_control_plane[0]') }}"
299299
when: kube_enable_rsyslog_server|default(true)
300300

301301
- name: Setup rsyslog client
302302
import_playbook: generic/rsyslog-client.yml
303303
vars:
304-
hostlist: "{{ rsyslog_client_group | default('k8s-cluster') }}"
304+
hostlist: "{{ rsyslog_client_group | default('k8s_cluster') }}"
305305
when: kube_enable_rsyslog_client|default(true)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- hosts: kube-master
2+
- hosts: kube_control_plane
33
become: true
44
tasks:
55
- name: Install helm chart for container registry
@@ -9,14 +9,14 @@
99
tags:
1010
- container-registry
1111

12-
- hosts: kube-node
12+
- hosts: kube_node
1313
become: true
1414
vars:
1515
container_registry_hostname: registry.local
1616
tasks:
1717
- name: Set registry hostname in /etc/hosts
1818
lineinfile:
1919
path: /etc/hosts
20-
line: "{{ hostvars[groups['kube-master'][0]]['ansible_host'] | default(hostvars[groups['kube-master'][0]]['ansible_default_ipv4']['address']) }} {{ container_registry_hostname }}"
20+
line: "{{ hostvars[groups['kube_control_plane'][0]]['ansible_host'] | default(hostvars[groups['kube_control_plane'][0]]['ansible_default_ipv4']['address']) }} {{ container_registry_hostname }}"
2121
tags:
2222
- container-registry

playbooks/k8s-cluster/netapp-trident.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Playbook for deploying NetApp Trident
33

44
- name: "Install NFS utils on worker nodes"
5-
hosts: kube-node
5+
hosts: kube_node
66
become: true
77
become_method: sudo
88
tasks:
@@ -16,7 +16,7 @@
1616
when: ansible_os_family == "RedHat"
1717

1818
- name: "Deploy NetApp Trident"
19-
hosts: kube-master
19+
hosts: kube_control_plane
2020
become: true
2121
vars_files:
2222
- ../../config/group_vars/netapp-trident.yml

playbooks/k8s-cluster/nfs-client-provisioner.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
# This playbook is used to setup the nfs-client-provisioner
33
# If the cluster already has an nfs server setup run with --skip-tags="nfs_server,nfs_mkdir"
4-
# Otherwhise an NFS server will be configured on kube-master[0]
4+
# Otherwhise an NFS server will be configured on kube_control_plane[0]
55
# After settting up an NFS server, nfs software is installed on all nodes
66
# Lastly, the nfs-client-provisioner is helm installed using the role
77
#
88
# The default NFS configuration of this playbook is not meant for production systems
99
# For production deployments please configur NFS with storage-partner guidance
1010
#
1111
# Install the required NFS software on all nodes and then helm install the nfs-client
12-
- hosts: kube-master[0]
12+
- hosts: kube_control_plane[0]
1313
become: yes
1414
tasks:
1515
- name: Make sure NFS directory exists and is globally writable
@@ -25,14 +25,14 @@
2525
- nfs_is_server: yes
2626
when: k8s_deploy_nfs_server
2727

28-
- hosts: "k8s-cluster"
28+
- hosts: "k8s_cluster"
2929
become: yes
3030
roles:
3131
- nfs
3232
tags:
3333
- nfs_software
3434

35-
- hosts: kube-master[0]
35+
- hosts: kube_control_plane[0]
3636
become: true
3737
tasks:
3838
- name: install nfs-client-provisioner

playbooks/k8s-cluster/nvidia-gpu-operator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import_playbook: ../bootstrap/bootstrap-openshift.yml
44

55
# GPU operator
6-
- hosts: kube-master[0]
6+
- hosts: kube_control_plane[0]
77
become: yes
88
tasks:
99
- name: Install helm chart for GPU operator

playbooks/k8s-cluster/nvidia-k8s-gpu-device-plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- hosts: kube-master[0]
2+
- hosts: kube_control_plane[0]
33
become: true
44
tasks:
55
- name: install k8s GPU plugin

playbooks/k8s-cluster/nvidia-k8s-gpu-feature-discovery.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- hosts: kube-master[0]
2+
- hosts: kube_control_plane[0]
33
become: true
44
tasks:
55
- name: install k8s GPU feature discovery

0 commit comments

Comments
 (0)