Robust names truncated to k8s DNS length
This commit is contained in:
@@ -15,4 +15,4 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.15.1
|
||||
version: 0.15.2
|
||||
|
||||
@@ -68,5 +68,5 @@ Create robustName that can be used as Kubernetes resource name, and as subdomain
|
||||
\W – all but \w .
|
||||
*/}}
|
||||
{{- define "robustName" -}}
|
||||
{{ regexReplaceAll "\\W+" . "-" | replace "_" "-" | lower }}
|
||||
{{ regexReplaceAll "\\W+" . "-" | replace "_" "-" | lower | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
secretName: {{ printf "tls-%s" $.Release.Name }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- host: {{ .host | trunc 63 | trimSuffix "-" | replace "/" "-" | replace "_" "-" | quote }}
|
||||
- host: {{ template "robustName" .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
|
||||
Reference in New Issue
Block a user