From c91b9c460e2934af15a3ef0358f88d3a9865ace9 Mon Sep 17 00:00:00 2001 From: Abhinav Dahiya Date: Thu, 1 Nov 2018 17:07:21 -0700 Subject: [PATCH] templates: use clsuter-name.base-domain for etcd srv search --- .../templates/aws/master/units/setup-etcd-environment.service | 2 +- .../libvirt/master/units/setup-etcd-environment.service | 2 +- .../openstack/master/units/setup-etcd-environment.service | 2 +- templates/_base/master/units/setup-etcd-environment.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/controller/template/test_data/templates/aws/master/units/setup-etcd-environment.service b/pkg/controller/template/test_data/templates/aws/master/units/setup-etcd-environment.service index 428e07adcf..c47c4230a7 100644 --- a/pkg/controller/template/test_data/templates/aws/master/units/setup-etcd-environment.service +++ b/pkg/controller/template/test_data/templates/aws/master/units/setup-etcd-environment.service @@ -2,7 +2,7 @@ contents: "[Unit]\nDescription=Setup Etcd Environment \nRequires=network-online \ \nAfter=network-online.target\n\n[Service]\nRestart=on-failure\nRestartSec=5s\n\n## FIXME(abhinav): switch this to official image.\nEnvironment=\"IMAGE=docker.io/abhinavdahiya/origin-setup-etcd-environment\"\n\nExecStartPre=/usr/bin/mkdir --parents /run/etcd\nExecStart=/bin/podman \\\n run \\\n --net host \\\n --rm - \\\n --volume /run/etcd:/run/etcd:z \\\n ${IMAGE} \\\n --discovery-srv=installer.team.coreos.systems + \\\n --volume /run/etcd:/run/etcd:z \\\n ${IMAGE} \\\n --discovery-srv=my-test-cluster.installer.team.coreos.systems \\\n --output-file=/run/etcd/environment \\\n --v=4 \\\n\n[Install]\nWantedBy=multi-user.target\n" enabled: true name: setup-etcd-environment.service diff --git a/pkg/controller/template/test_data/templates/libvirt/master/units/setup-etcd-environment.service b/pkg/controller/template/test_data/templates/libvirt/master/units/setup-etcd-environment.service index 428e07adcf..c47c4230a7 100644 --- a/pkg/controller/template/test_data/templates/libvirt/master/units/setup-etcd-environment.service +++ b/pkg/controller/template/test_data/templates/libvirt/master/units/setup-etcd-environment.service @@ -2,7 +2,7 @@ contents: "[Unit]\nDescription=Setup Etcd Environment \nRequires=network-online \ \nAfter=network-online.target\n\n[Service]\nRestart=on-failure\nRestartSec=5s\n\n## FIXME(abhinav): switch this to official image.\nEnvironment=\"IMAGE=docker.io/abhinavdahiya/origin-setup-etcd-environment\"\n\nExecStartPre=/usr/bin/mkdir --parents /run/etcd\nExecStart=/bin/podman \\\n run \\\n --net host \\\n --rm - \\\n --volume /run/etcd:/run/etcd:z \\\n ${IMAGE} \\\n --discovery-srv=installer.team.coreos.systems + \\\n --volume /run/etcd:/run/etcd:z \\\n ${IMAGE} \\\n --discovery-srv=my-test-cluster.installer.team.coreos.systems \\\n --output-file=/run/etcd/environment \\\n --v=4 \\\n\n[Install]\nWantedBy=multi-user.target\n" enabled: true name: setup-etcd-environment.service diff --git a/pkg/controller/template/test_data/templates/openstack/master/units/setup-etcd-environment.service b/pkg/controller/template/test_data/templates/openstack/master/units/setup-etcd-environment.service index 428e07adcf..c47c4230a7 100644 --- a/pkg/controller/template/test_data/templates/openstack/master/units/setup-etcd-environment.service +++ b/pkg/controller/template/test_data/templates/openstack/master/units/setup-etcd-environment.service @@ -2,7 +2,7 @@ contents: "[Unit]\nDescription=Setup Etcd Environment \nRequires=network-online \ \nAfter=network-online.target\n\n[Service]\nRestart=on-failure\nRestartSec=5s\n\n## FIXME(abhinav): switch this to official image.\nEnvironment=\"IMAGE=docker.io/abhinavdahiya/origin-setup-etcd-environment\"\n\nExecStartPre=/usr/bin/mkdir --parents /run/etcd\nExecStart=/bin/podman \\\n run \\\n --net host \\\n --rm - \\\n --volume /run/etcd:/run/etcd:z \\\n ${IMAGE} \\\n --discovery-srv=installer.team.coreos.systems + \\\n --volume /run/etcd:/run/etcd:z \\\n ${IMAGE} \\\n --discovery-srv=my-test-cluster.installer.team.coreos.systems \\\n --output-file=/run/etcd/environment \\\n --v=4 \\\n\n[Install]\nWantedBy=multi-user.target\n" enabled: true name: setup-etcd-environment.service diff --git a/templates/_base/master/units/setup-etcd-environment.yaml b/templates/_base/master/units/setup-etcd-environment.yaml index 7b841a24ad..811a0fdf22 100644 --- a/templates/_base/master/units/setup-etcd-environment.yaml +++ b/templates/_base/master/units/setup-etcd-environment.yaml @@ -20,7 +20,7 @@ contents: | --rm \ --volume /run/etcd:/run/etcd:z \ ${IMAGE} \ - --discovery-srv={{.BaseDomain}} \ + --discovery-srv={{.ClusterName}}.{{.BaseDomain}} \ --output-file=/run/etcd/environment \ --v=4 \