Skip to content

Commit

Permalink
Using helper to get postgres credentials (#7235)
Browse files Browse the repository at this point in the history
  • Loading branch information
gergelylendvai committed Oct 27, 2021
1 parent 2e128cf commit aa2caf1
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
8 changes: 8 additions & 0 deletions charts/airbyte/templates/scheduler/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,19 @@ spec:
configMapKeyRef:
name: airbyte-env
key: DATABASE_PORT
{{- if .Values.postgresql.enabled }}
- name: DATABASE_PASSWORD
valueFrom:
configMapKeyRef:
name: airbyte-env
key: DATABASE_PASSWORD
{{- else }}
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "airbyte.postgresql.secretName" . }}
key: {{ include "airbyte.database.existingsecret.key" . }}
{{- end }}
- name: DATABASE_URL
valueFrom:
configMapKeyRef:
Expand Down
4 changes: 2 additions & 2 deletions charts/airbyte/templates/server/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ spec:
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.externalDatabase.existingSecret }}
key: {{ .Values.externalDatabase.existingSecretPasswordKey }}
name: {{ include "airbyte.postgresql.secretName" . }}
key: {{ include "airbyte.database.existingsecret.key" . }}
{{- end }}
- name: DATABASE_URL
valueFrom:
Expand Down
11 changes: 11 additions & 0 deletions charts/airbyte/templates/temporal/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,19 @@ spec:
value: {{ include "airbyte.database.port" . | quote }}
- name: POSTGRES_USER
value: {{ include "airbyte.database.user" . }}
{{- if .Values.postgresql.enabled }}
- name: POSTGRES_PWD
valueFrom:
configMapKeyRef:
name: airbyte-env
key: DATABASE_PASSWORD
{{- else }}
- name: POSTGRES_PWD
valueFrom:
secretKeyRef:
name: {{ include "airbyte.postgresql.secretName" . }}
key: {{ include "airbyte.database.existingsecret.key" . }}
{{- end }}
- name: POSTGRES_SEEDS
value: {{ include "airbyte.database.host" . }}
- name: DYNAMIC_CONFIG_FILE_PATH
Expand All @@ -51,6 +59,9 @@ spec:
volumeMounts:
- name: airbyte-temporal-dynamicconfig
mountPath: "/etc/temporal/config/dynamicconfig/"
{{- if .Values.server.resources }}
resources: {{- toYaml .Values.temporal.resources | nindent 10 }}
{{- end }}
volumes:
- name: airbyte-temporal-dynamicconfig
configMap:
Expand Down
8 changes: 8 additions & 0 deletions charts/airbyte/templates/worker/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,19 @@ spec:
configMapKeyRef:
name: airbyte-env
key: DATABASE_PORT
{{- if .Values.postgresql.enabled }}
- name: DATABASE_PASSWORD
valueFrom:
configMapKeyRef:
name: airbyte-env
key: DATABASE_PASSWORD
{{- else }}
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "airbyte.postgresql.secretName" . }}
key: {{ include "airbyte.database.existingsecret.key" . }}
{{- end }}
- name: DATABASE_URL
valueFrom:
configMapKeyRef:
Expand Down

0 comments on commit aa2caf1

Please sign in to comment.