Skip to content

Commit

Permalink
fix rimusz#143 add randAlphaNum to instanceShortName
Browse files Browse the repository at this point in the history
  • Loading branch information
daibrahi committed Oct 18, 2023
1 parent 36e7528 commit e669674
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stable/gcloud-sqlproxy/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ Create the name of the service account to use
Create the short instance name
*/}}
{{- define "gcloud-sqlproxy.instanceShortName" -}}
{{ .instanceShortName | default (.instance | trunc 15 | trimSuffix "-") }}
{{- $randomString := randAlphaNum 10 -}}
{{ .instanceShortName | default (printf "%s-%s" (.instance | trunc 5 | trimSuffix "-") $randomString) }}
{{- end -}}

{{/*
Expand Down

0 comments on commit e669674

Please sign in to comment.