Skip to content

Commit

Permalink
feat(gcp-sa): gcp sa via file (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
guialvesp1 authored Oct 16, 2023
1 parent 0bb7806 commit 398be0b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cd-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ jobs:
- name: Write values.yaml file
run: |
cat << EOF > values.yaml
environment: "development"
api:
name: "api-development"
image:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cd-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
- name: Write values.yaml file
run: |
cat << EOF > values.yaml
environment: "prod"
api:
name: "api-prod"
image:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cd-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
- name: Write values.yaml file
run: |
cat << EOF > values.yaml
environment: "staging"
api:
name: "api-staging"
image:
Expand Down
11 changes: 11 additions & 0 deletions charts/basedosdados-api/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ spec:
- name: basedosdados-api
image: "{{ .Values.api.image.name }}:{{ .Values.api.image.tag }}"
imagePullPolicy: {{ .Values.api.image.pullPolicy }}
volumeMounts:
- mountPath: /var/secrets/
name: gcp-sa
readOnly: true
ports:
- name: http
containerPort: 80
Expand Down Expand Up @@ -79,3 +83,10 @@ spec:
timeoutSeconds: 5
failureThreshold: 5
successThreshold: 1
volumes:
- name: gcp-sa
secret:
secretName: api-{{ .Values.environment }}-secrets
items:
- key: GCP_SA
path: gcp-sa.json

0 comments on commit 398be0b

Please sign in to comment.