You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.4 KiB

  1. ---
  2. - name: Cilium | Start Resources
  3. kube:
  4. name: "{{ item.item.name }}"
  5. namespace: "kube-system"
  6. kubectl: "{{ bin_dir }}/kubectl"
  7. resource: "{{ item.item.type }}"
  8. filename: "{{ kube_config_dir }}/{{ item.item.name }}-{{ item.item.file }}"
  9. state: "latest"
  10. loop: "{{ cilium_node_manifests.results }}"
  11. when: inventory_hostname == groups['kube_control_plane'][0] and not item is skipped
  12. - name: Cilium | Wait for pods to run
  13. command: "{{ kubectl }} -n kube-system get pods -l k8s-app=cilium -o jsonpath='{.items[?(@.status.containerStatuses[0].ready==false)].metadata.name}'" # noqa 601
  14. register: pods_not_ready
  15. until: pods_not_ready.stdout.find("cilium")==-1
  16. retries: "{{ cilium_rolling_restart_wait_retries_count | int }}"
  17. delay: "{{ cilium_rolling_restart_wait_retries_delay_seconds | int }}"
  18. failed_when: false
  19. when: inventory_hostname == groups['kube_control_plane'][0]
  20. - name: Cilium | Hubble install
  21. kube:
  22. name: "{{ item.item.name }}"
  23. namespace: "kube-system"
  24. kubectl: "{{ bin_dir }}/kubectl"
  25. resource: "{{ item.item.type }}"
  26. filename: "{{ kube_config_dir }}/addons/hubble/{{ item.item.name }}-{{ item.item.file }}"
  27. state: "latest"
  28. loop: "{{ cilium_hubble_manifests.results }}"
  29. when:
  30. - inventory_hostname == groups['kube_control_plane'][0] and not item is skipped
  31. - cilium_enable_hubble and cilium_hubble_install