Skip to content

Commit

Permalink
fix(s3): fix env var if present
Browse files Browse the repository at this point in the history
  • Loading branch information
jdenquin committed Jan 24, 2024
1 parent 1075a65 commit 16f4c4b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions templates/api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,20 @@ spec:
{{ if .Values.global.s3.enabled }}
- name: LAGO_USE_AWS_S3
value: "true"
{{ if .Values.global.s3.accessKeyId }}
- name: LAGO_AWS_S3_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-secrets
key: awsS3AccessKeyId
{{ end }}
{{ if .Values.global.s3.secretAccessKey }}
- name: LAGO_AWS_S3_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-secrets
key: awsS3SecretAccessKey
{{ end }}
- name: LAGO_AWS_S3_BUCKET
value: {{ .Values.global.s3.aws.bucket | quote }}
- name: LAGO_AWS_S3_REGION
Expand Down
14 changes: 9 additions & 5 deletions templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,20 @@ spec:
{{ if .Values.global.s3.enabled }}
- name: LAGO_USE_AWS_S3
value: "true"
- name: LAGO_AWS_S3_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-secrets
key: awsS3AccessKeyId
{{ if .Values.global.s3.accessKeyId }}
- name: LAGO_AWS_S3_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-secrets
key: awsS3AccessKeyI
{{ end }}
{{ if .Values.global.s3.secretAccessKey }}
- name: LAGO_AWS_S3_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-secrets
key: awsS3SecretAccessKey
{{ end }}
- name: LAGO_AWS_S3_BUCKET
value: {{ .Values.global.s3.aws.bucket | quote }}
- name: LAGO_AWS_S3_REGION
Expand Down

0 comments on commit 16f4c4b

Please sign in to comment.