Skip to content

Commit

Permalink
[CCM-17154] Fix for fetching secrets of cloud info
Browse files Browse the repository at this point in the history
  • Loading branch information
suryanarayanan-venkatesan committed Apr 4, 2024
1 parent d319898 commit e3c1e67
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ Create the name of the service account to use
{{- $localESOSecretCtxIdentifier := (include "harnesscommon.secrets.localESOSecretCtxIdentifier" (dict "ctx" $ )) }}
{{- if eq (include "harnesscommon.secrets.isDefaultAppSecret" (dict "ctx" $ "variableName" "GCP_CREDENTIALS")) "true" }}
{{- $hasAtleastOneSecret = true }}
GCP_CREDENTIALS: '{{ .ctx.Values.secrets.default.GCP_CREDENTIALS }}'
{{- end }}
GCP_CREDENTIALS: {{ include "harnesscommon.secrets.passwords.manage" (dict "secret" "cloud-info-secret-mount" "key" "gcp-creds" "providedValues" (list "CLOUD_INFO_GCP_CREDS" "secrets.default.GCP_CREDENTIALS") "length" 10 "context" $) }}
{{- end }}
{{- if eq (include "harnesscommon.secrets.isDefaultAppSecret" (dict "ctx" $ "variableName" "CONFIG_FILE")) "true" }}
{{- $hasAtleastOneSecret = true }}
CONFIG_FILE: '{{ .ctx.Values.secrets.default.CONFIG_FILE }}'
CONFIG_FILE: {{ include "harnesscommon.secrets.passwords.manage" (dict "secret" "cloud-info-secret-mount" "key" "config-file" "providedValues" (list "CLOUD_INFO_CONFIG" "secrets.default.CONFIG_FILE") "length" 10 "context" $) }}
{{- end }}
{{- if not $hasAtleastOneSecret }}
{}
Expand All @@ -90,4 +90,4 @@ CONFIG_FILE: '{{ .ctx.Values.secrets.default.CONFIG_FILE }}'

{{- define "cloud-info.pullSecrets" -}}
{{ include "common.images.pullSecrets" (dict "images" (list .Values.image) "global" .Values.global ) }}
{{- end -}}
{{- end -}}

0 comments on commit e3c1e67

Please sign in to comment.