Fixing #28: ingress host names and resource names have different sanitization needs
This commit is contained in:
@@ -6,5 +6,5 @@ Create robustName that can be used as Kubernetes resource name, and as subdomain
|
||||
\W – all but \w .
|
||||
*/}}
|
||||
{{- define "common.robustName" -}}
|
||||
{{ regexReplaceAll "[^0-9A-Za-z_\\.]+" . "-" | replace "_" "-" | lower | trunc 63 | trimSuffix "-" | trimPrefix "-" }}
|
||||
{{ regexReplaceAll "\\W+" . "-" | replace "_" "-" | lower | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user