mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-07 09:27:38 -02:30
Fix etcd install with docker and etcd_kubeadm_enabled (#5777)
- This solves issue #5721 & #5713 (dupes) - Provide a cleaner default usage pattern for the download role around etcd that supports 'host' and 'docker' properly - Extract the 'etcdctl' as a separate task install piece and reuse it where appropriate - Update the kubeadm-etcd task to reflect the above change
This commit is contained in:
@@ -16,3 +16,12 @@
|
||||
include_tasks: "{{ role_path }}/../../etcd/tasks/install_host.yml"
|
||||
vars:
|
||||
etcd_cluster_setup: true
|
||||
when: etcd_deployment_type == "host"
|
||||
|
||||
- name: Ensure etcdctl binary is installed
|
||||
include_tasks: "{{ role_path }}/../../etcd/tasks/install_etcdctl_docker.yml"
|
||||
vars:
|
||||
etcd_cluster_setup: true
|
||||
etcd_retries: 4
|
||||
when:
|
||||
- etcd_deployment_type == "docker"
|
||||
|
||||
@@ -260,6 +260,12 @@
|
||||
msg: "kubeadm etcd mode requires experimental control plane"
|
||||
when: etcd_kubeadm_enabled
|
||||
|
||||
- name: Stop if etcd deployment type is not host or docker
|
||||
assert:
|
||||
that: etcd_deployment_type in ['host', 'docker']
|
||||
msg: "The etcd deployment type, 'etcd_deployment_type', must be host or docker"
|
||||
run_once: true
|
||||
|
||||
- name: Stop if download_localhost is enabled but download_run_once is not
|
||||
assert:
|
||||
that: download_run_once
|
||||
|
||||
@@ -185,7 +185,6 @@
|
||||
kube_etcd_cacert_file: "etcd/ca.crt"
|
||||
kube_etcd_cert_file: "apiserver-etcd-client.crt"
|
||||
kube_etcd_key_file: "apiserver-etcd-client.key"
|
||||
etcd_deployment_type: host
|
||||
when:
|
||||
- etcd_kubeadm_enabled
|
||||
|
||||
|
||||
Reference in New Issue
Block a user