Skip to content

Commit d1a08bd

Browse files
committed
(egress) use secret instead of configmap
Because the config.yaml contains secrets (S3 credentials, LiveKit API credentials), it is better to use a secret to avoid leaking secrets in the ArgoCD UI, for instance.
1 parent 27d22b5 commit d1a08bd

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

egress/templates/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
annotations:
1818
{{- toYaml . | nindent 8 }}
1919
{{- end }}
20-
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
20+
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
2121
labels:
2222
{{- include "egress.selectorLabels" . | nindent 8 }}
2323
spec:
@@ -34,7 +34,7 @@ spec:
3434
env:
3535
- name: EGRESS_CONFIG_BODY
3636
valueFrom:
37-
configMapKeyRef:
37+
secretKeyRef:
3838
name: {{ include "egress.fullname" . }}
3939
key: config.yaml
4040
ports:

egress/templates/secret.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: {{ include "egress.fullname" . }}
5+
stringData:
6+
config.yaml: |
7+
{{ toYaml .Values.egress | indent 4 }}

0 commit comments

Comments
 (0)