boomerang-io / charts

Helm charts for Boomerang Projects
Apache License 2.0
3 stars 5 forks source link

Helm Chart - Loader job only references MongoDB Secret #80

Open tlawrie opened 1 year ago

tlawrie commented 1 year ago

Loader job only references MongoDB Secret and does not handle referencing internal secret if password specified

tlawrie commented 1 year ago

Currently:

          {{- if $.Values.global.database.mongodb.secretName }}
          - name: MONGODB_PASSWORD
            valueFrom:
              secretKeyRef:
                name: {{ $.Values.global.database.mongodb.secretName }}
                key: mongodb-password
          {{- end }}

When should be:

          - name: MONGODB_PASSWORD
            valueFrom:
              secretKeyRef:
                name: {{ if $.Values.global.database.mongodb.secretName }}{{ $.Values.global.database.mongodb.secretName }}{{ else }}{{ include "bmrg.name" (dict "context" $context "tier" "secrets" ) }}{{ end }}
                key: {{ if $.Values.global.database.mongodb.secretName }}mongodb-password{{ else }}MONGODB_PASSWORD{{ end }}