Skip to content

Commit

Permalink
Update cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
JuribaDev committed Aug 29, 2024
1 parent fc4c4d4 commit 81cbb09
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
13 changes: 7 additions & 6 deletions k8s/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 81cbb09

Please sign in to comment.