X-Git-Url: https://gerrit.nordix.org/gitweb?p=infra%2Fstack%2Fkubernetes.git;a=blobdiff_plain;f=apps%2Fceph%2Fkubespray%2Fplaybooks%2Froles%2Finstall%2Ftasks%2Fmain.yaml;h=e9282a23866356105501633aaeb0dd7747f5aad7;hp=fc8f2dcf84d6a0b062097ae223696a7f7f8675ac;hb=346533a32cb7cf00414d723f2cdb89785f1a2e2d;hpb=3f7a6e04758ac28aa51bd66b67f600534f646ff0 diff --git a/apps/ceph/kubespray/playbooks/roles/install/tasks/main.yaml b/apps/ceph/kubespray/playbooks/roles/install/tasks/main.yaml index fc8f2dc..e9282a2 100644 --- a/apps/ceph/kubespray/playbooks/roles/install/tasks/main.yaml +++ b/apps/ceph/kubespray/playbooks/roles/install/tasks/main.yaml @@ -37,7 +37,7 @@ - name: Delete existing rook cluster CRD if any k8s: - api_version: apiextensions.k8s.io/v1beta1 + api_version: apiextensions.k8s.io/v1 state: absent kind: CustomResourceDefinition name: cephclusters.ceph.rook.io @@ -51,6 +51,7 @@ with_items: - operator.yaml.j2 - common.yaml.j2 + - crds.yaml.j2 loop_control: loop_var: config_file ignore_errors: true @@ -66,11 +67,27 @@ delay: 5 tags: reset +- name: label storage nodes # noqa 305 + shell: "kubectl label node {{ item }} {{ rook_storage_label }}=true" + changed_when: true + with_items: "{{ rook_storage_nodes }}" + +- name: taint storage nodes # noqa 305 + shell: "kubectl taint node {{ item }} {{ rook_storage_label }}=true:NoSchedule" + changed_when: true + with_items: "{{ rook_storage_nodes }}" + +- name: label nodes for other workloads # noqa 305 + shell: "kubectl label node {{ item }} {{ rook_storage_label }}=false" + changed_when: true + with_items: "{{ rook_nostorage_nodes }}" + - name: Create rook operator k8s: state: present definition: "{{ lookup('template', config_file) }}" with_items: + - crds.yaml.j2 - common.yaml.j2 - operator.yaml.j2 loop_control: