From aada6e7e40e42c085d2848f2be77bb2baea70a5e Mon Sep 17 00:00:00 2001 From: YichenWong Date: Thu, 17 Oct 2019 10:50:39 +0800 Subject: [PATCH] Add etcd_data_dir variable to the kubeadm config (#5263) --- .../kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 | 2 +- .../kubernetes/master/templates/kubeadm-config.v1beta2.yaml.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 b/roles/kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 index 46f47799b..e0523a2f8 100644 --- a/roles/kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 +++ b/roles/kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 @@ -39,7 +39,7 @@ etcd: local: imageRepository: "{{ etcd_image_repo | regex_replace("/etcd$","") }}" imageTag: "{{ etcd_image_tag }}" - dataDir: "/var/lib/etcd" + dataDir: "{{ etcd_data_dir }}" extraArgs: metrics: {{ etcd_metrics }} election-timeout: "{{ etcd_election_timeout }}" diff --git a/roles/kubernetes/master/templates/kubeadm-config.v1beta2.yaml.j2 b/roles/kubernetes/master/templates/kubeadm-config.v1beta2.yaml.j2 index dea57826b..327fcc6f2 100644 --- a/roles/kubernetes/master/templates/kubeadm-config.v1beta2.yaml.j2 +++ b/roles/kubernetes/master/templates/kubeadm-config.v1beta2.yaml.j2 @@ -42,7 +42,7 @@ etcd: local: imageRepository: "{{ etcd_image_repo | regex_replace("/etcd$","") }}" imageTag: "{{ etcd_image_tag }}" - dataDir: "/var/lib/etcd" + dataDir: "{{ etcd_data_dir }}" extraArgs: metrics: {{ etcd_metrics }} election-timeout: "{{ etcd_election_timeout }}"