Skip to content

Commit

Permalink
Add clearer error message if the release name contains characters tha…
Browse files Browse the repository at this point in the history
…t would cause more vague errors otherwise.
  • Loading branch information
joshw committed Aug 30, 2024
1 parent 659dc1b commit cc64c99
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions zenoss-agent-kubernetes/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ If release name contains chart name it will be used as a full name.
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if regexMatch "[\\._]" .Release.Name }}
{{- fail "Release name is invalid. It must not contain _ or ." -}}
{{- end}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
Expand Down

0 comments on commit cc64c99

Please sign in to comment.