Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cadence] Pull value from secret rather than plaintext in job #1302

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cadence/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cadence
version: 0.21.3
version: 0.21.4
appVersion: 0.21.3
description: Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way.
icon: https://raw.githubusercontent.com/uber/cadence-web/master/client/assets/logo.svg
Expand Down
21 changes: 21 additions & 0 deletions cadence/templates/server-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,14 @@ spec:
- name: SQL_USER
value: {{ include "cadence.persistence.sql.user" (list $ $store) }}
- name: SQL_PASSWORD
{{- if .Values.mysql.enabled }}
valueFrom:
secretKeyRef:
name: {{ include "cadence.persistence.secretName" (list $ $store) | quote }}
key: {{ include "cadence.persistence.secretKey" (list $ $store) | quote }}
{{- else -}}
value: {{ include "cadence.persistence.sql.password" (list $ $store) }}
{{- end -}}
{{- with $storeConfig.sql.connectAttributes }}
- name: SQL_CONNECT_ATTRIBUTES
value: {{ include "to-query" . }}
Expand Down Expand Up @@ -158,7 +165,14 @@ spec:
- name: SQL_USER
value: {{ include "cadence.persistence.sql.user" (list $ $store) }}
- name: SQL_PASSWORD
{{- if .Values.mysql.enabled }}
valueFrom:
secretKeyRef:
name: {{ include "cadence.persistence.secretName" (list $ $store) | quote }}
key: {{ include "cadence.persistence.secretKey" (list $ $store) | quote }}
{{- else -}}
value: {{ include "cadence.persistence.sql.password" (list $ $store) }}
{{- end -}}
{{- with $storeConfig.sql.connectAttributes }}
- name: SQL_CONNECT_ATTRIBUTES
value: {{ include "to-query" . }}
Expand Down Expand Up @@ -282,7 +296,14 @@ spec:
- name: SQL_USER
value: {{ include "cadence.persistence.sql.user" (list $ $store) }}
- name: SQL_PASSWORD
{{- if .Values.mysql.enabled }}
valueFrom:
secretKeyRef:
name: {{ include "cadence.persistence.secretName" (list $ $store) | quote }}
key: {{ include "cadence.persistence.secretKey" (list $ $store) | quote }}
{{- else -}}
value: {{ include "cadence.persistence.sql.password" (list $ $store) }}
{{- end -}}
{{- with $storeConfig.sql.connectAttributes }}
- name: SQL_CONNECT_ATTRIBUTES
value: {{ include "to-query" . }}
Expand Down