mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
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:
commit
f605bfda61
@ -113,7 +113,7 @@ func WriteStaticPodManifests(cfg *kubeadmapi.MasterConfiguration) error {
|
|||||||
"etcd",
|
"etcd",
|
||||||
"--listen-client-urls=http://127.0.0.1:2379",
|
"--listen-client-urls=http://127.0.0.1:2379",
|
||||||
"--advertise-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()},
|
VolumeMounts: []api.VolumeMount{certsVolumeMount(), etcdVolumeMount(), k8sVolumeMount()},
|
||||||
Image: images.GetCoreImage(images.KubeEtcdImage, cfg, kubeadmapi.GlobalEnvParams.EtcdImage),
|
Image: images.GetCoreImage(images.KubeEtcdImage, cfg, kubeadmapi.GlobalEnvParams.EtcdImage),
|
||||||
@ -161,7 +161,7 @@ func etcdVolume(cfg *kubeadmapi.MasterConfiguration) api.Volume {
|
|||||||
func etcdVolumeMount() api.VolumeMount {
|
func etcdVolumeMount() api.VolumeMount {
|
||||||
return api.VolumeMount{
|
return api.VolumeMount{
|
||||||
Name: "etcd",
|
Name: "etcd",
|
||||||
MountPath: "/var/etcd",
|
MountPath: "/var/lib/etcd",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ func TestEtcdVolumeMount(t *testing.T) {
|
|||||||
{
|
{
|
||||||
expected: api.VolumeMount{
|
expected: api.VolumeMount{
|
||||||
Name: "etcd",
|
Name: "etcd",
|
||||||
MountPath: "/var/etcd",
|
MountPath: "/var/lib/etcd",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user