Update harbor release
This commit is contained in:
@@ -144,12 +144,26 @@ app: "{{ template "harbor.name" . }}"
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{- define "harbor.redis.pwdfromsecret" -}}
|
||||
{{- (lookup "v1" "Secret" .Release.Namespace (.Values.redis.external.existingSecret)).data.REDIS_PASSWORD | b64dec }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "harbor.redis.cred" -}}
|
||||
{{- with .Values.redis }}
|
||||
{{- if (and (eq .type "external" ) (.external.existingSecret)) }}
|
||||
{{- printf ":%s@" (include "harbor.redis.pwdfromsecret" $) }}
|
||||
{{- else }}
|
||||
{{- ternary (printf "%s:%s@" (.external.username | urlquery) (.external.password | urlquery)) "" (and (eq .type "external" ) (not (not .external.password))) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
/*scheme://[:password@]host:port[/master_set]*/
|
||||
{{- define "harbor.redis.url" -}}
|
||||
{{- with .Values.redis }}
|
||||
{{- $path := ternary "" (printf "/%s" (include "harbor.redis.masterSet" $)) (not (include "harbor.redis.masterSet" $)) }}
|
||||
{{- $cred := ternary (printf "%s:%s@" (.external.username | urlquery) (.external.password | urlquery)) "" (and (eq .type "external" ) (not (not .external.password))) }}
|
||||
{{- printf "%s://%s%s%s" (include "harbor.redis.scheme" $) $cred (include "harbor.redis.addr" $) $path -}}
|
||||
{{- printf "%s://%s%s%s" (include "harbor.redis.scheme" $) (include "harbor.redis.cred" $) (include "harbor.redis.addr" $) $path -}}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user