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

Replacing the static pod definition for etcd ip. #3100

Merged
merged 1 commit into from
Jun 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kwoodson why does this file change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jim-minter, inside of openshift-ansible the template service broker has the 'l_os_registry_url` variable defined.

https://github.com/openshift/openshift-ansible/blob/master/roles/template_service_broker/defaults/main.yml#L11

This variable is being set in openshift_facts and the expectation is that we include these facts to run these other roles:
https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_facts/defaults/main.yml#L15

I included the facts which brings those variables into scope.

Hope this helps clarify.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

roles:
- openshift_facts

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