Unverified Commit ca8a7a2c authored by Evgeny L's avatar Evgeny L Committed by Ilya Dmitrichenko

Fix Command for etcd Pod

getComponentCommand method is too hyperkube specific to be used for etcd Pod.
parent a23239ac
...@@ -58,7 +58,12 @@ func WriteStaticPodManifests(s *kubeadmapi.KubeadmConfig) error { ...@@ -58,7 +58,12 @@ func WriteStaticPodManifests(s *kubeadmapi.KubeadmConfig) error {
staticPodSpecs := map[string]api.Pod{ staticPodSpecs := map[string]api.Pod{
// TODO this needs a volume // TODO this needs a volume
etcd: componentPod(api.Container{ etcd: componentPod(api.Container{
Command: getComponentCommand(etcd, s), Command: []string{
"/usr/local/bin/etcd",
"--listen-client-urls=http://127.0.0.1:2379",
"--advertise-client-urls=http://127.0.0.1:2379",
"--data-dir=/var/etcd/data",
},
VolumeMounts: []api.VolumeMount{etcdVolumeMount()}, VolumeMounts: []api.VolumeMount{etcdVolumeMount()},
Image: images.GetCoreImage(images.KubeEtcdImage, s.EnvParams["etcd_image"]), Image: images.GetCoreImage(images.KubeEtcdImage, s.EnvParams["etcd_image"]),
LivenessProbe: componentProbe(2379, "/health"), LivenessProbe: componentProbe(2379, "/health"),
...@@ -187,12 +192,6 @@ func getComponentCommand(component string, s *kubeadmapi.KubeadmConfig) (command ...@@ -187,12 +192,6 @@ func getComponentCommand(component string, s *kubeadmapi.KubeadmConfig) (command
pki_dir := "/etc/kubernetes/pki" pki_dir := "/etc/kubernetes/pki"
baseFlags := map[string][]string{ baseFlags := map[string][]string{
etcd: []string{
"/usr/local/bin/etcd",
"--listen-client-urls=http://127.0.0.1:2379",
"--advertise-client-urls=http://127.0.0.1:2379",
"--data-dir=/var/etcd/data",
},
apiServer: []string{ apiServer: []string{
"--address=127.0.0.1", "--address=127.0.0.1",
"--etcd-servers=http://127.0.0.1:2379", "--etcd-servers=http://127.0.0.1:2379",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment