diff --git a/stable/mailhog/Chart.yaml b/stable/mailhog/Chart.yaml index ae43a16702..33328d3e1e 100644 --- a/stable/mailhog/Chart.yaml +++ b/stable/mailhog/Chart.yaml @@ -2,18 +2,18 @@ apiVersion: v1 description: An e-mail testing tool for developers name: mailhog appVersion: 1.0.0 -version: 2.1.0 +version: 2.2.0 keywords: -- mailhog -- mail -- smtp -- email -- e-mail -- testing + - mailhog + - mail + - smtp + - email + - e-mail + - testing home: http://iankent.uk/project/mailhog/ icon: https://raw.githubusercontent.com/mailhog/MailHog-UI/master/assets/images/hog.png sources: -- https://github.com/mailhog/MailHog + - https://github.com/mailhog/MailHog maintainers: -- name: unguiculus - email: unguiculus@gmail.com + - name: unguiculus + email: unguiculus@gmail.com diff --git a/stable/mailhog/templates/_helpers.tpl b/stable/mailhog/templates/_helpers.tpl index 9e5efa94e6..36ccb329d8 100644 --- a/stable/mailhog/templates/_helpers.tpl +++ b/stable/mailhog/templates/_helpers.tpl @@ -9,11 +9,27 @@ Expand the name of the chart. {{/* Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. */}} {{- define "mailhog.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} {{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "mailhog.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} {{/* Create the name for the auth secret. diff --git a/stable/mailhog/templates/auth-secret.yaml b/stable/mailhog/templates/auth-secret.yaml index 83471ac580..c63c16481d 100644 --- a/stable/mailhog/templates/auth-secret.yaml +++ b/stable/mailhog/templates/auth-secret.yaml @@ -4,7 +4,7 @@ kind: Secret metadata: labels: app: {{ template "mailhog.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} + chart: {{ template "mailhog.chart" . }} heritage: {{ .Release.Service }} release: {{ .Release.Name }} name: {{ template "mailhog.authFileSecret" . }} diff --git a/stable/mailhog/templates/deployment.yaml b/stable/mailhog/templates/deployment.yaml index 5a406ecd16..c07fa555e6 100644 --- a/stable/mailhog/templates/deployment.yaml +++ b/stable/mailhog/templates/deployment.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: labels: app: {{ template "mailhog.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} + chart: {{ template "mailhog.chart" . }} heritage: {{ .Release.Service }} release: {{ .Release.Name }} name: {{ template "mailhog.fullname" . }} diff --git a/stable/mailhog/templates/ingress.yaml b/stable/mailhog/templates/ingress.yaml index 92663fbd94..f8a5e2eae7 100644 --- a/stable/mailhog/templates/ingress.yaml +++ b/stable/mailhog/templates/ingress.yaml @@ -10,7 +10,7 @@ metadata: {{- end }} labels: app: {{ template "mailhog.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} + chart: {{ template "mailhog.chart" . }} heritage: {{ .Release.Service }} release: {{ .Release.Name }} name: {{ $fullName }} diff --git a/stable/mailhog/templates/service.yaml b/stable/mailhog/templates/service.yaml index e377793e1d..9ebaed1aa6 100644 --- a/stable/mailhog/templates/service.yaml +++ b/stable/mailhog/templates/service.yaml @@ -7,7 +7,7 @@ metadata: {{- end }} labels: app: {{ template "mailhog.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} + chart: {{ template "mailhog.chart" . }} heritage: {{ .Release.Service }} release: {{ .Release.Name }} name: {{ template "mailhog.fullname" . }}