Skip to content

Commit 92e8ac9

Browse files
authored
Remove tag 'master' (#12228)
* Remove tag master Following it's deprecation in 4b324cb (Rename master to control plane - non-breaking changes only (#11394), 2024-09-06) * Add fail fast path when using removed tags - Used for the master tag, but this could be used for other things in the future
1 parent 73b3e9b commit 92e8ac9

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

docs/ansible/ansible.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ The following tags are defined in playbooks:
118118
| local-path-provisioner | Configure External provisioner: local-path |
119119
| local-volume-provisioner | Configure External provisioner: local-volume |
120120
| macvlan | Network plugin macvlan |
121-
| master (DEPRECATED) | Deprecated - see `control-plane` |
122121
| metallb | Installing and configuring metallb |
123122
| metrics_server | Configuring metrics_server |
124123
| netchecker | Installing netchecker K8s app |

playbooks/cluster.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
environment: "{{ proxy_disable_env }}"
3939
roles:
4040
- { role: kubespray_defaults }
41-
- { role: kubernetes/control-plane, tags: master }
41+
- { role: kubernetes/control-plane, tags: control-plane }
4242
- { role: kubernetes/client, tags: client }
4343
- { role: kubernetes-apps/cluster_roles, tags: cluster-roles }
4444

@@ -75,7 +75,7 @@
7575
environment: "{{ proxy_disable_env }}"
7676
roles:
7777
- { role: kubespray_defaults }
78-
- { role: win_nodes/kubernetes_patch, tags: ["master", "win_nodes"] }
78+
- { role: win_nodes/kubernetes_patch, tags: ["control-plane", "win_nodes"] }
7979

8080
- name: Install Kubernetes apps
8181
hosts: kube_control_plane

roles/etcd/tasks/main.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
- kube_network_plugin != "calico" or calico_datastore == "etcd"
4040
- ('k8s_cluster' in group_names)
4141
tags:
42-
- master # master tag is deprecated and replaced by control-plane
4342
- control-plane
4443
- network
4544

@@ -51,7 +50,6 @@
5150
- kube_network_plugin != "calico" or calico_datastore == "etcd"
5251
- ('k8s_cluster' in group_names)
5352
tags:
54-
- master # master tag is deprecated and replaced by control-plane
5553
- control-plane
5654
- network
5755

roles/kubernetes/preinstall/tasks/0050-create_directories.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
- bootstrap_os
1515
- apps
1616
- network
17-
- master # master tag is deprecated and replaced by control-plane
1817
- control-plane
1918
- node
2019
with_items:
@@ -38,7 +37,6 @@
3837
- bootstrap_os
3938
- apps
4039
- network
41-
- master # master tag is deprecated and replaced by control-plane
4240
- control-plane
4341
- node
4442
with_items:

roles/validate_inventory/tasks/main.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
---
2-
# This should only contains check of the inventory itself, nothing depending on facts
2+
# This should only contains check of:
3+
# - the inventory
4+
# - extra variables
5+
# - ansible commandline
6+
# -> nothing depending on facts or similar cluster state
37
# Checks depending on current state (of the nodes or the cluster)
48
# should be in roles/kubernetes/preinstall/tasks/0040-verify-settings.yml
9+
- name: Stop if removed tags are used
10+
assert:
11+
msg: The tag 'master' is removed. Use 'control-plane' instead
12+
that:
13+
- ('master' not in ansible_run_tags)
14+
- ('master' not in ansible_skip_tags)
15+
# TODO: Remove checks after next release
16+
517
- name: Stop if kube_control_plane group is empty
618
assert:
719
that: groups.get( 'kube_control_plane' )

0 commit comments

Comments
 (0)