Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
double check azure db name
Browse files Browse the repository at this point in the history
  • Loading branch information
henryguan committed Sep 29, 2020
1 parent 5b95b21 commit 6f33af0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ type: Opaque
data:
{{- $user := derivePassword 1 "maximum" (toString (required "You must provide a value for auth.secretSeed. Use --set auth.secretSeed={password} or include a value in your overrides.yaml file." (default .Values.auth.masterPassword .Values.auth.secretSeed))) (join "-" (list .service "db-user")) .Release.Name | toString }}
{{- $userIncludeHost := false -}} {{/* check if user is in format user@host which is usually required by Azure DB for PostgreSQL */}}
{{- if .Values.db.user -}}
{{- if contains "@" .Values.db.user -}}
{{- if and (not (empty .Values.db.user)) (not (empty .Values.db.host)) -}}
{{- if and (contains "@" .Values.db.user) (hasSuffix ".azure.com" .Values.db.host) -}}
{{- $userIncludeHost = true -}}
{{- end }}
{{- end }}
Expand Down

0 comments on commit 6f33af0

Please sign in to comment.