Skip to content

Commit

Permalink
Merge pull request #3 from zenoss/ZING-35547
Browse files Browse the repository at this point in the history
Add clearer error message if the release name contains characters that would cause more vague errors otherwise.
  • Loading branch information
joshw authored Aug 30, 2024
2 parents 659dc1b + cc64c99 commit 730845e
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 730845e

Please sign in to comment.