From b9baeb308e70ac050e6d56f9781a3771481afe14 Mon Sep 17 00:00:00 2001 From: nspmx Date: Tue, 23 Apr 2024 17:36:39 -0400 Subject: [PATCH] change prod deployment helm logic --- .github/workflows/google-gke-prod.yaml | 14 +++++++++----- helm/{staging.yaml => arkansas.yaml} | 8 ++++---- 2 files changed, 13 insertions(+), 9 deletions(-) rename helm/{staging.yaml => arkansas.yaml} (91%) diff --git a/.github/workflows/google-gke-prod.yaml b/.github/workflows/google-gke-prod.yaml index f9e2f5c..1365382 100644 --- a/.github/workflows/google-gke-prod.yaml +++ b/.github/workflows/google-gke-prod.yaml @@ -65,6 +65,10 @@ on: description: 'Production Release Name' required: true type: string + date: + description: 'Production Release Date' + required: true + type: string update_release: description: 'Check if you are updating the production release name of the latest image' required: true @@ -111,7 +115,7 @@ jobs: gcloud beta artifacts docker tags add \ --quiet \ ${{ env.GCP_ARTIFACT_REGISTRY_LOCATION }}-docker.pkg.dev/${{ env.GCP_PROJECT_ID }}/${{ env.GCP_ARTIFACT_REGISTRY_NAME }}/${{ env.GCP_IMAGE_NAME }}:${{ env.GKE_APP_NAMESPACE }} \ - ${{ env.GCP_ARTIFACT_REGISTRY_LOCATION }}-docker.pkg.dev/${{ env.GCP_PROJECT_ID }}/${{ env.GCP_ARTIFACT_REGISTRY_NAME }}/${{ env.GCP_IMAGE_NAME }}:${{ inputs.release }} + ${{ env.GCP_ARTIFACT_REGISTRY_LOCATION }}-docker.pkg.dev/${{ env.GCP_PROJECT_ID }}/${{ env.GCP_ARTIFACT_REGISTRY_NAME }}/${{ env.GCP_IMAGE_NAME }}:${{ inputs.release }}-${{ inputs.date }} # Transform GitHub secrets to base64 encoded - name: Set encoded secret values @@ -128,8 +132,8 @@ jobs: --set app.environment=${{ env.GKE_APP_NAMESPACE }} \ --set app.release=${{ env.GKE_APP_NAMESPACE }} \ --set image.repository=${{ env.GCP_ARTIFACT_REGISTRY_LOCATION }}-docker.pkg.dev/${{ env.GCP_PROJECT_ID }}/${{ env.GCP_ARTIFACT_REGISTRY_NAME }}/${{ env.GCP_IMAGE_NAME }} \ - --set image.tag=${{ inputs.release }} \ - --set nameOverride=${{ env.GKE_APP_NAME }} \ - --set fullnameOverride=${{ env.GKE_APP_NAME }} \ + --set image.tag=${{ inputs.release }}-${{ inputs.date }} \ + --set nameOverride=${{ env.GKE_APP_NAME }}-${{ inputs.release }} \ + --set fullnameOverride=${{ env.GKE_APP_NAME }}-${{ inputs.release }} \ --set secrets.TESSERACT_BACKEND=$ENCODED_TESSERACT_BACKEND \ - ${{ env.GKE_APP_NAME }} --values=./helm/staging.yaml ./helm \ No newline at end of file + ${{ env.GKE_APP_NAME }}-${{ inputs.release }} --values=./helm/${{ inputs.release }}.yaml ./helm \ No newline at end of file diff --git a/helm/staging.yaml b/helm/arkansas.yaml similarity index 91% rename from helm/staging.yaml rename to helm/arkansas.yaml index d05e16e..b051d6d 100644 --- a/helm/staging.yaml +++ b/helm/arkansas.yaml @@ -77,15 +77,15 @@ ingress: nginx.org/location-snippets: | add_header Access-Control-Allow-Origin *; customHosts: - - host: api-staging.datausa.io + - host: api-ts-arkansas.datausa.io paths: - path: / - service: cache-api-service + service: tesseract-api-arkansas-cache port: 80 - path: /signaller - service: cache-api-service + service: tesseract-api-arkansas-cache port: 8090 tls: - secretName: tesseract-api-varnish-ingress-tls hosts: - - api-staging.datausa.io + - api-ts-arkansas.datausa.io