486b223e01
This replaces kube-master with kube_control_plane because of [1]: The Kubernetes project is moving away from wording that is considered offensive. A new working group WG Naming was created to track this work, and the word "master" was declared as offensive. A proposal was formalized for replacing the word "master" with "control plane". This means it should be removed from source code, documentation, and user-facing configuration from Kubernetes and its sub-projects. NOTE: The reason why this changes it to kube_control_plane not kube-control-plane is for valid group names on ansible. [1]: https://github.com/kubernetes/enhancements/blob/master/keps/sig-cluster-lifecycle/kubeadm/2067-rename-master-label-taint/README.md#motivation
28 lines
988 B
YAML
28 lines
988 B
YAML
---
|
|
- hosts: kube-node:kube_control_plane
|
|
tasks:
|
|
- name: Remove old cloud provider config
|
|
file:
|
|
path: "{{ item }}"
|
|
state: absent
|
|
with_items:
|
|
- /etc/kubernetes/cloud_config
|
|
- hosts: kube_control_plane[0]
|
|
tasks:
|
|
- name: Include kubespray-default variables
|
|
include_vars: ../roles/kubespray-defaults/defaults/main.yaml
|
|
- name: Copy get_cinder_pvs.sh to master
|
|
copy:
|
|
src: get_cinder_pvs.sh
|
|
dest: /tmp
|
|
mode: u+rwx
|
|
- name: Get PVs provisioned by in-tree cloud provider # noqa 301
|
|
command: /tmp/get_cinder_pvs.sh
|
|
register: pvs
|
|
- name: Remove get_cinder_pvs.sh
|
|
file:
|
|
path: /tmp/get_cinder_pvs.sh
|
|
state: absent
|
|
- name: Rewrite the "pv.kubernetes.io/provisioned-by" annotation # noqa 301
|
|
command: "{{ bin_dir }}/kubectl annotate --overwrite pv {{ item }} pv.kubernetes.io/provisioned-by=cinder.csi.openstack.org"
|
|
loop: "{{ pvs.stdout_lines | list }}"
|