Merge pull request #39429 from apprenda/kubeadm_80-change_etcd_datadir

Automatic merge from submit-queue

kubeadm: change etcd data dir to match host path.

**What this PR does / why we need it**: Trivial change that adopts a well-known path for etcd data, following the `hostPath` defined.

**Which issue this PR fixes**: Fixes https://github.com/kubernetes/kubeadm/issues/80

**Special notes for your reviewer**:
/cc @luxas @kad
This commit is contained in:
Kubernetes Submit Queue 2017-01-05 00:13:28 -08:00 committed by GitHub
commit f605bfda61
2 changed files with 3 additions and 3 deletions

View File

@ -113,7 +113,7 @@ func WriteStaticPodManifests(cfg *kubeadmapi.MasterConfiguration) error {
"etcd",
"--listen-client-urls=http://127.0.0.1:2379",
"--advertise-client-urls=http://127.0.0.1:2379",
"--data-dir=/var/etcd/data",
"--data-dir=/var/lib/etcd",
},
VolumeMounts: []api.VolumeMount{certsVolumeMount(), etcdVolumeMount(), k8sVolumeMount()},
Image: images.GetCoreImage(images.KubeEtcdImage, cfg, kubeadmapi.GlobalEnvParams.EtcdImage),
@ -161,7 +161,7 @@ func etcdVolume(cfg *kubeadmapi.MasterConfiguration) api.Volume {
func etcdVolumeMount() api.VolumeMount {
return api.VolumeMount{
Name: "etcd",
MountPath: "/var/etcd",
MountPath: "/var/lib/etcd",
}
}

View File

@ -103,7 +103,7 @@ func TestEtcdVolumeMount(t *testing.T) {
{
expected: api.VolumeMount{
Name: "etcd",
MountPath: "/var/etcd",
MountPath: "/var/lib/etcd",
},
},
}