Skip to content

Commit

Permalink
Merge pull request #5 from 7SOATSquad30/build/public-lb-and-prod-secrets
Browse files Browse the repository at this point in the history
build: deploy with public lb and prod secrets
  • Loading branch information
MuriloKakazu authored Dec 3, 2024
2 parents 2a3b7a8 + 9fc03a7 commit 08bec88
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ jobs:
DB_DATABASE: ${{ secrets.DB_DATABASE }}
DB_USERNAME: ${{ secrets.DB_USERNAME }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}
VERSION: ${{ env.VERSION }}
ENVIRONMENT: prod
run: |
Expand Down
6 changes: 6 additions & 0 deletions k8s/deployment.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ spec:
value: "$DB_USERNAME"
- name: DB_PASSWORD
value: "$DB_PASSWORD"
- name: AWS_ACCESS_KEY_ID
value: "$AWS_ACCESS_KEY_ID"
- name: AWS_SECRET_ACCESS_KEY
value: "$AWS_SECRET_ACCESS_KEY"
- name: AWS_SESSION_TOKEN
value: "$AWS_SESSION_TOKEN"
- name: SPRING_PROFILES_ACTIVE
value: "$ENVIRONMENT"
image: fiap7soat30/customer-api:$VERSION
Expand Down
17 changes: 17 additions & 0 deletions k8s/service.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,20 @@ spec:
port: 80
targetPort: 8080
type: LoadBalancer
---
apiVersion: v1
kind: Service
metadata:
name: customer-api-svc-public
annotations:
service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing"
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "HTTP"
service.beta.kubernetes.io/aws-load-balancer-type: "alb"
spec:
selector:
app: customer-api
ports:
- protocol: TCP
port: 80
targetPort: 8080
type: LoadBalancer

0 comments on commit 08bec88

Please sign in to comment.