Skip to content

Commit 5383a48

Browse files
committed
Fix static ip
1 parent 89be796 commit 5383a48

File tree

3 files changed

+13
-20
lines changed

3 files changed

+13
-20
lines changed

.travis.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ after_success:
6767
- docker build --pull -t gcr.io/api-platform-demo-209807/php -t gcr.io/api-platform-demo-209807/php:latest api --target api_platform_php
6868
- docker build --pull -t gcr.io/api-platform-demo-209807/nginx -t gcr.io/api-platform-demo-209807/nginx:latest api --target api_platform_nginx
6969
- docker build --pull -t gcr.io/api-platform-demo-209807/varnish -t gcr.io/api-platform-demo-209807/varnish:latest api --target api_platform_varnish
70-
- gcloud docker -- push gcr.io/api-platform-demo-209807/php:latest
71-
- gcloud docker -- push gcr.io/api-platform-demo-209807/nginx:latest
72-
- gcloud docker -- push gcr.io/api-platform-demo-209807/varnish:latest
73-
- helm install --namespace=${TRAVIS_COMMIT} ./api/helm/api --wait --set php.repository=gcr.io/api-platform-demo-209807/php --set nginx.repository=gcr.io/api-platform-demo-209807/nginx --set secret=${APP_SECRET} --set postgresUser=${DATABASE_USER},postgresPassword="${DATABASE_PASSWORD}",postgresDatabase=${DATABASE_NAME} --set postgresql.persistence.enabled=true --set corsAllowOrigin='*'
70+
- gcloud docker -- push gcr.io/api-platform-demo-209807/php
71+
- gcloud docker -- push gcr.io/api-platform-demo-209807/nginx
72+
- gcloud docker -- push gcr.io/api-platform-demo-209807/varnish
73+
- helm install --wait --namespace=${TRAVIS_COMMIT} ./api/helm/api --set php.repository=gcr.io/api-platform-demo-209807/php --set nginx.repository=gcr.io/api-platform-demo-209807/nginx --set secret=${APP_SECRET} --set postgresUser=${DATABASE_USER},postgresPassword="${DATABASE_PASSWORD}",postgresDatabase=${DATABASE_NAME} --set postgresql.persistence.enabled=true --set corsAllowOrigin='*'
74+
- sleep 60
7475
- kubectl get po --namespace=${TRAVIS_COMMIT}
7576
- kubectl --namespace=${TRAVIS_COMMIT} get pods -l app=api-php -o jsonpath="{.items[0].metadata.name}"
7677
- kubectl exec -it $(kubectl --namespace=${TRAVIS_COMMIT} get pods -l app=api-php -o jsonpath="{.items[0].metadata.name}") --namespace=${TRAVIS_COMMIT} -- ash -c 'export APP_ENV=dev && composer install -n && bin/console d:s:u --force --env=dev && bin/console hautelook:fixtures:load -n && APP_ENV=prod composer --no-dev install --classmap-authoritative && bin/console d:s:u --env=prod'

api/helm/api/templates/ingress.yaml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,10 @@ metadata:
1212
{{ $key }}: {{ $value | quote }}
1313
{{- end }}
1414
spec:
15-
rules:
16-
- http:
17-
paths:
18-
- path: /
19-
backend:
20-
serviceName: demo-ip
21-
servicePort: 8080
22-
- path: /
23-
backend:
24-
serviceName: {{ if .Values.varnish.enabled }}varnish{{ else }}api{{ end }}
25-
servicePort: 80
26-
{{- if .Values.ingress.tls }}
27-
tls:
28-
{{ toYaml .Values.ingress.tls | indent 4 }}
29-
{{- end -}}
15+
backend:
16+
serviceName: {{ if .Values.varnish.enabled }}varnish{{ else }}api{{ end }}
17+
servicePort: 80
18+
{{- if .Values.ingress.tls }}
19+
tls:
20+
{{ toYaml .Values.ingress.tls | indent 4 }}
21+
{{- end -}}

api/helm/api/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ varnish:
2929

3030
ingress:
3131
annotations:
32-
kubernetes.io/ingress.global-static-ip-name: demo-ip
32+
kubernetes.io/ingress.global-static-ip-name: demo-ip
3333
# kubernetes.io/ingress.class: gce
3434
# kubernetes.io/tls-acme: "true"
3535
tls:

0 commit comments

Comments
 (0)