diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 9d04a1e..3c29217 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -81,17 +81,17 @@ jobs: sudo chmod 777 k8s/manifests.yaml # Update Kubernetes manifests with secrets and environment variables - sed -i 's|ENVIRONMENT_NAMESPACE|'${{ secrets.ENVIRONMENT_NAMESPACE }}'|g' k8s/manifests.yaml - sed -i 's|MONGODB_URI_SECRET|'${{ secrets.MONGODB_URI_SECRET }}'|g' k8s/manifests.yaml - sed -i 's|JWT_KEY_SECRET|'${{ secrets.JWT_KEY_SECRET }}'|g' k8s/manifests.yaml - sed -i 's|LOCATION|'${{env.LOCATION}}'|g' k8s/manifests.yaml - sed -i 's|PROJECT_ID|'${{ secrets.GCP_PROJECT_ID }}'|g' k8s/manifests.yaml - sed -i 's|REPO_NAME|'${{ secrets.REPO_NAME }}'|g' k8s/manifests.yaml - sed -i 's|TAG|'${{ github.sha }}'|g' k8s/manifests.yaml - sed -i 's|STATIC_IP_PLACEHOLDER|'${{ secrets.STATIC_IP }}'|g' k8s/manifests.yaml + sed -i "s|ENVIRONMENT_NAMESPACE|${{ secrets.ENVIRONMENT_NAMESPACE }}|g" k8s/manifests.yaml + sed -i "s|MONGODB_URI_SECRET|${{ secrets.MONGODB_URI_SECRET }}|g" k8s/manifests.yaml + sed -i "s|JWT_KEY_SECRET|${{ secrets.JWT_KEY_SECRET }}|g" k8s/manifests.yaml + sed -i "s|LOCATION|${{env.LOCATION}}|g" k8s/manifests.yaml + sed -i "s|PROJECT_ID|${{ secrets.GCP_PROJECT_ID }}|g" k8s/manifests.yaml + sed -i "s|REPO_NAME|${{ secrets.REPO_NAME }}|g" k8s/manifests.yaml + sed -i "s|TAG|${{ github.sha }}|g" k8s/manifests.yaml + sed -i "s|STATIC_IP_NAME_PLACEHOLDER|${{ secrets.STATIC_IP_NAME_PLACEHOLDER }}|g" k8s/manifests.yaml # Apply Kubernetes manifests - kubectl apply -f k8s/ + kubectl apply -f k8s/manifests.yaml - name: Setup TLS and Wait for Deployments run: | diff --git a/k8s/manifests.yaml b/k8s/manifests.yaml index 308e237..d382d44 100644 --- a/k8s/manifests.yaml +++ b/k8s/manifests.yaml @@ -89,14 +89,15 @@ metadata: annotations: kubernetes.io/ingress.class: nginx cert-manager.io/cluster-issuer: "letsencrypt-prod" + kubernetes.io/ingress.global-static-ip-name: "STATIC_IP_NAME_PLACEHOLDER" spec: - tls: - - hosts: - - STATIC_IP_PLACEHOLDER - secretName: rnd-platform-tls + defaultBackend: + service: + name: client-service + port: + number: 80 rules: - - host: STATIC_IP_PLACEHOLDER - http: + - http: paths: - path: / pathType: Prefix