Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1425 from cloudfoundry-incubator/viccuad/fix-upg-…
Browse files Browse the repository at this point in the history
…cleanup-rel2.5

Add dns record for ssh_proxy in upgrade job too, in release-2.5 branch
  • Loading branch information
Vlad Iovanov authored Oct 2, 2020
2 parents 2e47fb4 + ddb6eb9 commit 263427c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .concourse/tasks/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,18 @@ make kubecf
# Setup dns
tcp_router_ip=$(kubectl get svc -n scf tcp-router-public -o json | jq -r .status.loadBalancer.ingress[].ip | head -n 1)
public_router_ip=$(kubectl get svc -n scf router-public -o json | jq -r .status.loadBalancer.ingress[].ip | head -n 1)
# ssh-proxy service is named differently in diego and eirini
ssh_proxy_svc=$(kubectl get svc -n scf | grep ssh-proxy | awk '{print $1}' | head -n 1)
ssh_proxy_ip=$(kubectl get svc -n scf "${ssh_proxy_svc}" -o json | jq -r .status.loadBalancer.ingress[].ip | head -n 1)

gcloud --quiet beta dns --project="${GKE_PROJECT}" record-sets transaction start \
--zone="${GKE_DNS_ZONE}"
gcloud --quiet beta dns --project="${GKE_PROJECT}" record-sets transaction add \
--name="*.${DOMAIN}." --ttl=300 --type=A --zone="${GKE_DNS_ZONE}" "$public_router_ip"
gcloud --quiet beta dns --project="${GKE_PROJECT}" record-sets transaction add \
--name="tcp.${DOMAIN}." --ttl=300 --type=A --zone="${GKE_DNS_ZONE}" "${tcp_router_ip}"
gcloud --quiet beta dns --project="${GKE_PROJECT}" record-sets transaction add \
--name="ssh.${DOMAIN}." --ttl=300 --type=A --zone="${GKE_DNS_ZONE}" "$ssh_proxy_ip"
gcloud --quiet beta dns --project="${GKE_PROJECT}" record-sets transaction execute \
--zone="${GKE_DNS_ZONE}"

Expand Down

0 comments on commit 263427c

Please sign in to comment.