diff --git a/incubator/vault/Chart.yaml b/incubator/vault/Chart.yaml index 016cb857d5..278bb1e2f4 100644 --- a/incubator/vault/Chart.yaml +++ b/incubator/vault/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: A Helm chart for Vault, a tool for managing secrets name: vault -version: 0.18.4 +version: 0.18.5 appVersion: 1.0.1 home: https://www.vaultproject.io/ icon: https://www.vaultproject.io/assets/images/mega-nav/logo-vault-0f83e3d2.svg diff --git a/incubator/vault/templates/_helpers.tpl b/incubator/vault/templates/_helpers.tpl index 3f9d9725e4..9c91fc03e5 100644 --- a/incubator/vault/templates/_helpers.tpl +++ b/incubator/vault/templates/_helpers.tpl @@ -29,3 +29,10 @@ Create the name of the service account to use {{ default "default" .Values.serviceAccount.name }} {{- end -}} {{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "vault.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/incubator/vault/templates/configmap.yaml b/incubator/vault/templates/configmap.yaml index 531d7f4ae1..ec2c8bc484 100644 --- a/incubator/vault/templates/configmap.yaml +++ b/incubator/vault/templates/configmap.yaml @@ -7,7 +7,7 @@ metadata: app: "{{ template "vault.name" . }}" release: {{ .Release.Name | quote }} heritage: {{ .Release.Service | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + chart: "{{ template "vault.chart" . }}" data: config.json: | {{ .Values.vault.config | toJson }} diff --git a/incubator/vault/templates/deployment.yaml b/incubator/vault/templates/deployment.yaml index 565e1730a3..073d4b8d8c 100644 --- a/incubator/vault/templates/deployment.yaml +++ b/incubator/vault/templates/deployment.yaml @@ -4,7 +4,7 @@ metadata: name: {{ template "vault.fullname" . }} labels: app: {{ template "vault.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + chart: {{ template "vault.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} {{- if .Values.labels }} diff --git a/incubator/vault/templates/ingress.yaml b/incubator/vault/templates/ingress.yaml index d99bb1e1ef..6ff99a873a 100644 --- a/incubator/vault/templates/ingress.yaml +++ b/incubator/vault/templates/ingress.yaml @@ -7,7 +7,7 @@ metadata: name: {{ template "vault.fullname" . }} labels: app: {{ template "vault.name" . }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + chart: "{{ template "vault.chart" . }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" {{- if .Values.ingress.labels }} diff --git a/incubator/vault/templates/service.yaml b/incubator/vault/templates/service.yaml index 13efcd7a59..728756a84a 100644 --- a/incubator/vault/templates/service.yaml +++ b/incubator/vault/templates/service.yaml @@ -4,7 +4,7 @@ metadata: name: {{ template "vault.fullname" . }} labels: app: {{ template "vault.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + chart: {{ template "vault.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} {{- if .Values.service.annotations }} diff --git a/incubator/vault/templates/serviceaccount.yaml b/incubator/vault/templates/serviceaccount.yaml index 22e96550ea..e04418fda2 100644 --- a/incubator/vault/templates/serviceaccount.yaml +++ b/incubator/vault/templates/serviceaccount.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "vault.serviceAccountName" . }} labels: app: {{ template "vault.name" . }} - chart: {{ template "vault.chart" . }} + chart: "{{ template "vault.chart" . }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" {{- end -}}