ceph: disable dashboard
[infra/stack/kubernetes.git] / apps / ceph / kubespray / playbooks / roles / install / tasks / main.yaml
index 6d3a676aa0d2c91bc1a7c923ea18ddfff8ead747..60ed129e0d7a39cc60e48c64bd6af2dafee67381 100644 (file)
@@ -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
   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:
     loop_var: config_file
 
+- name: Implement Workaround for connectivity problem - ping all tunnels
+  k8s:
+    state: present
+    definition: "{{ lookup('template', config_file) }}"
+  with_items:
+    - ping-tunnel-workaround.yaml.j2
+  loop_control:
+    loop_var: config_file
+
 - name: Wait until OPERATOR pod is available
   k8s_facts:
     kind: Pod
   until:
     - rook_mgr_status.resources is defined
     - rook_mgr_status.resources
-  retries: 20
+  retries: 40
   delay: 5
 
 - name: Create rook cluster
   register: rook_cluster_status
   until:
     - rook_cluster_status.resources
-  retries: 10
+  retries: 20
   delay: 5
 
 - name: Wait until MGR pods are available
   until:
     - rook_mgr_status.resources is defined
     - rook_mgr_status.resources
-  retries: 30
+  retries: 40
   delay: 10
 
 - name: Wait until OSD pods are available
   until:
     - rook_osd_status.resources is defined
     - rook_osd_status.resources
-  retries: 30
+  retries: 60
   delay: 10
 
 - name: Create rook block storage
   k8s:
     state: present
     definition: "{{ lookup('template', 'external-dashboard-https.yaml.j2') }}"
+  when: rook_ceph_dashboard_enabled|bool
 
 # vim: set ts=2 sw=2 expandtab: