Skip to content
Snippets Groups Projects
Commit fdb5906a authored by Dobromir Palushev's avatar Dobromir Palushev
Browse files

fixing static_ip_adresses for staging and production

parent 9d8d080b
No related branches found
No related tags found
23 merge requests!71A pipeline Job rename,!69Workflow updates,!68Workflow updates,!67Workflow updates,!65updated logic of the test-job,!63updated logic of the test-job,!61updated logic of the test-job,!59updated logic of the test-job,!57updated logic of the test-job,!55added "create-release-tag" job,!54updated logic of the test-job,!53Workflow updates,!51updated logic of the test-job,!49updated logic of the test-job,!48updated logic of the test-job,!46updated logic of the test-job,!44updated logic of the test-job,!43updated logic of the test-job,!42updated logic of the test-job,!41updated logic of the test-job,!40updated logic of the test-job,!39updated logic of the test-job,!38updated logic of the test-job
......@@ -120,10 +120,12 @@ deploy-image:
when: 'always'
variables:
ENVIRONMENT_NAME: 'staging'
STATIC_IP: 'staging-todoapp-ip'
- if: $CI_COMMIT_REF_NAME !~ /main/
when: 'always'
variables:
ENVIRONMENT_NAME: 'production'
STATIC_IP: 'todoapp-ip'
tags:
- docker
image: google/cloud-sdk:${GOOGLE_CLOUD_SDK_IMAGE_VERSION}
......@@ -137,7 +139,8 @@ deploy-image:
- DEPLOYMENT_MANIFEST=$(sed -e "s,{{image}},${IMAGE},g" ./deployment.yaml.tmpl)
- echo "${DEPLOYMENT_MANIFEST}" | kubectl apply --namespace "${ENVIRONMENT_NAME}-${K8S_NAMESPACE}" --filename -
- kubectl apply -f service.yaml --namespace "${ENVIRONMENT_NAME}-${K8S_NAMESPACE}"
- kubectl apply -f ingress.yaml --namespace "${ENVIRONMENT_NAME}-${K8S_NAMESPACE}"
- INGRESS_MANIFEST=$(sed -e "s,{{static-ip-name}},${STATIC_IP},g" ./ingress.yaml.tmpl)
- echo "${INGRESS_MANIFEST}" | kubectl apply --namespace "${ENVIRONMENT_NAME}-${K8S_NAMESPACE}" --filename -
......@@ -5,7 +5,7 @@ metadata:
annotations:
kubernetes.io/ingress.class: "gce" # an external load-balancer
kubernetes.io/ingress.allow-http: "false" # disabling HTTP
kubernetes.io/ingress.global-static-ip-name: todoapp-ip # staging-todoapp-ip for staging
kubernetes.io/ingress.global-static-ip-name: {{static-ip-name}} # staging-todoapp-ip for staging
networking.gke.io/managed-certificates: todoapp-managed-cert # defined in the infrastructure repository
spec:
# rules:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment