diff --git a/zenoss-agent-kubernetes/templates/_helpers.tpl b/zenoss-agent-kubernetes/templates/_helpers.tpl index f337908..fb1dae1 100644 --- a/zenoss-agent-kubernetes/templates/_helpers.tpl +++ b/zenoss-agent-kubernetes/templates/_helpers.tpl @@ -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 -}}