Skip to content

Commit

Permalink
Corrected env name
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandhya1874 committed Jan 30, 2025
1 parent 85b3fa8 commit a971c39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
{{- define "discoveryCronJob.envs" -}}
{{- if and .Values.discoveryCronJob (hasKey .Values.discoveryCronJob "namespace_secrets") -}}
{{- if .discoveryCronJob.namespace_secrets -}}
env:
{{- range $namespace, $secrets := .Values.discoveryCronJob.namespace_secrets }}
{{- if eq $namespace "hmpps-github-discovery" }}
{{- range $key, $val := $secrets }}
- name: {{ $key }}
valueFrom:
secretKeyRef:
key: {{ trimSuffix "?" $val }}
name: {{ $namespace }}{{ if hasSuffix "?" $val }}
optional: true{{ end }}
{{- end }}
{{- end }}
{{- end }}
{{- range $secret, $envs := .discoveryCronJob.namespace_secrets }}
{{- range $key, $val := $envs }}
- name: {{ $key }}
valueFrom:
secretKeyRef:
key: {{ trimSuffix "?" $val }}
name: {{ $secret }}{{ if hasSuffix "?" $val }}
optional: true{{ end }} {{- end }}
{{- end }}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.postgresDatabaseRestore.enabled -}}
{{- if .Values.discoveryCronJob.enabled -}}
---
apiVersion: v1
kind: ConfigMap
Expand Down

0 comments on commit a971c39

Please sign in to comment.