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.

29 lines
975 B

  1. ---
  2. - name: Add worker nodes to the etcd play if needed
  3. hosts: kube_node
  4. roles:
  5. - { role: kubespray-defaults }
  6. tasks:
  7. - name: Check if nodes needs etcd client certs (depends on network_plugin)
  8. group_by:
  9. key: "_kubespray_needs_etcd"
  10. when:
  11. - kube_network_plugin in ["flannel", "canal", "cilium"] or
  12. (cilium_deploy_additionally | default(false)) or
  13. (kube_network_plugin == "calico" and calico_datastore == "etcd")
  14. - etcd_deployment_type != "kubeadm"
  15. tags: etcd
  16. - name: Install etcd
  17. hosts: etcd:kube_control_plane:_kubespray_needs_etcd
  18. gather_facts: False
  19. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  20. environment: "{{ proxy_disable_env }}"
  21. roles:
  22. - { role: kubespray-defaults }
  23. - role: etcd
  24. tags: etcd
  25. vars:
  26. etcd_cluster_setup: true
  27. etcd_events_cluster_setup: "{{ etcd_events_cluster_enabled }}"
  28. when: etcd_deployment_type != "kubeadm"