1
0
Fork 0

remove secret reference in ci file, add traefik wait loop

trunk
Thomas 2 years ago
parent 20dd36cff4
commit 67715b8553

@ -135,8 +135,3 @@ volumes:
- name: dockersock
host:
path: /var/run/docker.sock
---
kind: secret
name: gcp-credentials
data: <GCP_ENCRYPTED_CREDENTIALS>

@ -1,3 +1,7 @@
def get_traefik_ip
`HTTPS_PROXY=localhost:8888 kubectl -n traefik get services | grep traefik | grep pending | awk '{ print $4 }'`
end
if ENV['GCE_PROJECT'] && ENV['GCE_DOMAIN'] && ENV['DNS_EMAIL'] && ENV['GCE_REGION']
if !File.exist?('traefik-service-account.json')
puts "File traefik-service-account.json is missing"
@ -28,6 +32,13 @@ if ENV['GCE_PROJECT'] && ENV['GCE_DOMAIN'] && ENV['DNS_EMAIL'] && ENV['GCE_REGIO
system("envsubst < deployment_base.yml > deployment.yml")
system("HTTPS_PROXY=localhost:8888 kubectl apply -f deployment.yml")
puts "Waiting for traefik load balancer's public ip address"
while !get_traefik_ip.match /[0-9]?[0-9]?[0-9]\.[0-9]?[0-9]?[0-9]\.[0-9]?[0-9]?[0-9]\.[0-9]?[0-9]?[0-9]/ do
puts "... still waiting"
sleep 5
end
puts "The public IP is #{get_traefik_ip}"
puts "You probably want to add it to your DNS config : *.#{ENV['GCE_DOMAIN']} A #{get_traefik_ip}"
else
puts "Missing env vars, did you define GCE_PROJECT, GCE_DOMAIN, GCE_REGION and DNS_EMAIL ?"
exit 1

Loading…
Cancel
Save