etcd: deploy container engine if needed (#7532)

If the etcd cluster is separate and the etcd_deployment_type is "host",
there is no need for a container engine on the etcd nodes

Do not rely on a 'default(true)' filter, but define a proper default in
kubespray-defaults depending on etcd deployment method and if internal
or external etcd is used
This commit is contained in:
Max Gautier
2021-10-12 09:31:47 +02:00
committed by GitHub
parent 6c004efd5f
commit e4c8c7188e
5 changed files with 9 additions and 6 deletions

View File

@@ -244,6 +244,9 @@ kubelet_shutdown_grace_period: 60s
# to give normal pods time to be gracefully evacuated
kubelet_shutdown_grace_period_critical_pods: 20s
# Whether to deploy the container engine
deploy_container_engine: inventory_hostname in groups['k8s_cluster'] or etcd_deployment_type != 'host'
# Container for runtime
container_manager: docker

View File

@@ -100,7 +100,7 @@
when:
- crictl.stat.exists
- container_manager in ["crio", "containerd"]
- deploy_container_engine|default(true)
- deploy_container_engine
- name: reset | stop and disable crio service
service: