Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Replacing the static pod definition for etcd ip.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenny Woodson committed May 31, 2018
1 parent da8646d commit 69bcd35
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions parts/openshift/unstable/openshiftmasterscript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ else
SERVICE_TYPE=origin
fi
VERSION="$(rpm -q $SERVICE_TYPE --queryformat %{VERSION})"
IP_ADDRESS="{{ .MasterIP }}"

if [ -f "/etc/sysconfig/atomic-openshift-node" ]; then
ANSIBLE_DEPLOY_TYPE="openshift-enterprise"
Expand Down Expand Up @@ -101,6 +102,10 @@ for loc in /root/.kube/config /etc/origin/node/bootstrap.kubeconfig /etc/origin/
cp /etc/origin/master/admin.kubeconfig "$loc"
done


# Patch the etcd_ip address placed inside of the static pod definition from the node install
sed -i "s/ETCD_IP_REPLACE/${IP_ADDRESS}/g" /etc/origin/node/disabled/etcd.yaml

# Move each static pod into place so the kubelet will run it.
# Pods: [apiserver, controller, etcd]
mv /etc/origin/node/disabled/* /etc/origin/node/pods
Expand Down
2 changes: 2 additions & 0 deletions pkg/acsengine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -1909,11 +1909,13 @@ func (t *TemplateGenerator) getTemplateFuncMap(cs *api.ContainerService) templat
ExternalMasterHostname string
RouterLBHostname string
Location string
MasterIP string
}{
ConfigBundle: base64.StdEncoding.EncodeToString(cs.Properties.OrchestratorProfile.OpenShiftConfig.ConfigBundles["master"]),
ExternalMasterHostname: fmt.Sprintf("%s.%s.cloudapp.azure.com", cs.Properties.MasterProfile.DNSPrefix, cs.Properties.AzProfile.Location),
RouterLBHostname: fmt.Sprintf("%s-router.%s.cloudapp.azure.com", cs.Properties.MasterProfile.DNSPrefix, cs.Properties.AzProfile.Location),
Location: cs.Properties.AzProfile.Location,
MasterIP: cs.Properties.MasterProfile.FirstConsecutiveStaticIP,
})
return b.String(), err
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/openshift/certgen/unstable/templates/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
hosts: localmaster
gather_facts: false

tasks:
# we need variables from openshift_facts to be in scope
roles:
- openshift_facts

post_tasks:
- name: bring up the sdn
import_role:
name: openshift_sdn
Expand Down

0 comments on commit 69bcd35

Please sign in to comment.