From 6318bb9f9697464fdefb4778822b0e782225806d Mon Sep 17 00:00:00 2001 From: Sergey Date: Sat, 18 Apr 2020 15:59:36 +0300 Subject: [PATCH] Return the ability to start control plain from the hyperkube image (#5422) --- roles/download/templates/kubeadm-images.yaml.j2 | 1 + .../kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 | 1 + .../kubernetes/master/templates/kubeadm-config.v1beta2.yaml.j2 | 1 + roles/kubespray-defaults/defaults/main.yaml | 3 +++ 4 files changed, 6 insertions(+) diff --git a/roles/download/templates/kubeadm-images.yaml.j2 b/roles/download/templates/kubeadm-images.yaml.j2 index be148196b..ec31ea43c 100644 --- a/roles/download/templates/kubeadm-images.yaml.j2 +++ b/roles/download/templates/kubeadm-images.yaml.j2 @@ -7,6 +7,7 @@ apiVersion: kubeadm.k8s.io/v1beta1 kind: ClusterConfiguration imageRepository: {{ kube_image_repo }} kubernetesVersion: {{ kube_version }} +useHyperKubeImage: {{ kubeadm_use_hyperkube_image }} etcd: {% if etcd_kubeadm_enabled %} local: diff --git a/roles/kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 b/roles/kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 index 63bd818d2..e0276e2de 100644 --- a/roles/kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 +++ b/roles/kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 @@ -95,6 +95,7 @@ controlPlaneEndpoint: {{ ip | default(fallback_ips[inventory_hostname]) }}:{{ ku {% endif %} certificatesDir: {{ kube_cert_dir }} imageRepository: {{ kube_image_repo }} +useHyperKubeImage: {{ kubeadm_use_hyperkube_image }} apiServer: extraArgs: {% if kube_api_anonymous_auth is defined %} diff --git a/roles/kubernetes/master/templates/kubeadm-config.v1beta2.yaml.j2 b/roles/kubernetes/master/templates/kubeadm-config.v1beta2.yaml.j2 index c0bdd0398..9809692b0 100644 --- a/roles/kubernetes/master/templates/kubeadm-config.v1beta2.yaml.j2 +++ b/roles/kubernetes/master/templates/kubeadm-config.v1beta2.yaml.j2 @@ -98,6 +98,7 @@ controlPlaneEndpoint: {{ ip | default(fallback_ips[inventory_hostname]) }}:{{ ku {% endif %} certificatesDir: {{ kube_cert_dir }} imageRepository: {{ kube_image_repo }} +useHyperKubeImage: {{ kubeadm_use_hyperkube_image }} apiServer: extraArgs: {% if kube_api_anonymous_auth is defined %} diff --git a/roles/kubespray-defaults/defaults/main.yaml b/roles/kubespray-defaults/defaults/main.yaml index 547e62740..c6e21a979 100644 --- a/roles/kubespray-defaults/defaults/main.yaml +++ b/roles/kubespray-defaults/defaults/main.yaml @@ -20,6 +20,9 @@ kube_version: v1.17.5 ## The minimum version working kube_version_min_required: v1.16.0 +# use HyperKube image to control plane containers +kubeadm_use_hyperkube_image: False + ## Kube Proxy mode One of ['iptables','ipvs'] kube_proxy_mode: ipvs