Skip to content

Commit

Permalink
Fix using existingSecret in jobs (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
perplexa authored Jan 26, 2022
1 parent 683c53a commit 240cc89
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions templates/server-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,16 @@ spec:
- name: CASSANDRA_USER
value: {{ $storeConfig.cassandra.user }}
{{- end }}
{{- if $storeConfig.cassandra.password }}
{{- if (or $storeConfig.cassandra.password $storeConfig.cassandra.existingSecret) }}
- name: CASSANDRA_PASSWORD
{{- if $storeConfig.cassandra.existingSecret }}
valueFrom:
secretKeyRef:
name: {{ include "temporal.persistence.secretName" (list $ $store) }}
key: {{ include "temporal.persistence.secretKey" (list $ $store) }}
{{- else }}
value: {{ $storeConfig.cassandra.password }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
Expand All @@ -97,9 +104,16 @@ spec:
- name: CASSANDRA_USER
value: {{ $storeConfig.cassandra.user }}
{{- end }}
{{- if $storeConfig.cassandra.password }}
{{- if (or $storeConfig.cassandra.password $storeConfig.cassandra.existingSecret) }}
- name: CASSANDRA_PASSWORD
{{- if $storeConfig.cassandra.existingSecret }}
valueFrom:
secretKeyRef:
name: {{ include "temporal.persistence.secretName" (list $ $store) }}
key: {{ include "temporal.persistence.secretKey" (list $ $store) }}
{{- else }}
value: {{ $storeConfig.cassandra.password }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
Expand Down Expand Up @@ -193,9 +207,16 @@ spec:
- name: CASSANDRA_USER
value: {{ $storeConfig.cassandra.user }}
{{- end }}
{{- if $storeConfig.cassandra.password }}
{{- if (or $storeConfig.cassandra.password $storeConfig.cassandra.existingSecret) }}
- name: CASSANDRA_PASSWORD
{{- if $storeConfig.cassandra.existingSecret }}
valueFrom:
secretKeyRef:
name: {{ include "temporal.persistence.secretName" (list $ $store) }}
key: {{ include "temporal.persistence.secretKey" (list $ $store) }}
{{- else }}
value: {{ $storeConfig.cassandra.password }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
Expand Down

0 comments on commit 240cc89

Please sign in to comment.