Commit a519506c authored by nikhiljindal's avatar nikhiljindal

Fixing scripts to bring up federation control plane

parent 69832629
...@@ -129,6 +129,13 @@ function create-federation-api-objects { ...@@ -129,6 +129,13 @@ function create-federation-api-objects {
$template "${manifests_root}/federation-apiserver-lb-service.yaml" | $host_kubectl create -f - $template "${manifests_root}/federation-apiserver-lb-service.yaml" | $host_kubectl create -f -
for i in {1..30};do for i in {1..30};do
echo "attempting to get federation-apiserver loadbalancer hostname ($i / 30)" echo "attempting to get federation-apiserver loadbalancer hostname ($i / 30)"
LB_STATUS=`${host_kubectl} get -o=jsonpath svc/${FEDERATION_APISERVER_DEPLOYMENT_NAME} --template '{.status.loadBalancer}'`
# Check if ingress field has been set in load balancer status.
if [[ "${LB_STATUS}" != *"ingress"* ]]; then
echo "Waiting for load balancer status to be set"
sleep 5
continue
fi
for field in ip hostname;do for field in ip hostname;do
FEDERATION_API_HOST=`${host_kubectl} get -o=jsonpath svc/${FEDERATION_APISERVER_DEPLOYMENT_NAME} --template '{.status.loadBalancer.ingress[*].'"${field}}"` FEDERATION_API_HOST=`${host_kubectl} get -o=jsonpath svc/${FEDERATION_APISERVER_DEPLOYMENT_NAME} --template '{.status.loadBalancer.ingress[*].'"${field}}"`
if [[ ! -z "${FEDERATION_API_HOST// }" ]];then if [[ ! -z "${FEDERATION_API_HOST// }" ]];then
......
...@@ -28,7 +28,7 @@ spec: ...@@ -28,7 +28,7 @@ spec:
mountPath: /etc/ssl/certs mountPath: /etc/ssl/certs
- name: kubeconfig - name: kubeconfig
readOnly: true readOnly: true
mountPath: "/etc/federation/controller-manager", mountPath: "/etc/federation/controller-manager"
image: {{.FEDERATION_CONTROLLER_MANAGER_IMAGE_REPO}}:{{.FEDERATION_CONTROLLER_MANAGER_IMAGE_TAG}} image: {{.FEDERATION_CONTROLLER_MANAGER_IMAGE_REPO}}:{{.FEDERATION_CONTROLLER_MANAGER_IMAGE_TAG}}
command: command:
- /usr/local/bin/hyperkube - /usr/local/bin/hyperkube
......
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