diff --git a/stable/gcloud-sqlproxy/Chart.yaml b/stable/gcloud-sqlproxy/Chart.yaml index d4f28db..7d70c7c 100755 --- a/stable/gcloud-sqlproxy/Chart.yaml +++ b/stable/gcloud-sqlproxy/Chart.yaml @@ -19,4 +19,4 @@ name: gcloud-sqlproxy sources: - https://github.com/rimusz/charts type: application -version: 0.25.2 +version: 0.25.3 diff --git a/stable/gcloud-sqlproxy/README.md b/stable/gcloud-sqlproxy/README.md index dd37860..82b6318 100755 --- a/stable/gcloud-sqlproxy/README.md +++ b/stable/gcloud-sqlproxy/README.md @@ -165,6 +165,8 @@ GCP does not support more than 5 endpoints on an Internal Load Balancer. To work Please note, as of `0.25.0` use [cloud-sql-proxy v2](https://github.com/GoogleCloudPlatform/cloud-sql-proxy/blob/main/migration-guide.md). The `httpPortProbe` replaced `httpLivenessProbe.port` & `httpReadinessProbe.port`. +Please note, as of `0.25.3`, if the value of `cloudsql.instances[].instanceShortName` remains undefined, an instanceShortName of 15 characters length will be generated, with a combination of first 5 letters of the instance name, then a hypen "-" and the remaining 9 characters will be autogenerated. + **From <= 0.22.2 to >= 0.23.0** Please note, the `securityContext` has been renamed into `podSecurityContext`. diff --git a/stable/gcloud-sqlproxy/templates/_helpers.tpl b/stable/gcloud-sqlproxy/templates/_helpers.tpl index 8564788..61fd838 100755 --- a/stable/gcloud-sqlproxy/templates/_helpers.tpl +++ b/stable/gcloud-sqlproxy/templates/_helpers.tpl @@ -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 9 | lower -}} +{{ .instanceShortName | default (printf "%s-%s" (.instance | trunc 5 | trimSuffix "-") $randomString) }} {{- end -}} {{/*