From eec62bb53324252409717363175cd533e9c4a7d9 Mon Sep 17 00:00:00 2001 From: Shoichi Kaji Date: Thu, 27 Jun 2019 15:49:45 +0900 Subject: [PATCH] [stable/heapster] Fix stable heapster fullname (#13711) * [stable/heapster] fix how to define fullname This follows the default _helpers.tpl by `helm create NAME` Signed-off-by: Shoichi Kaji * [stable/heapster] 0.3.3 -> 0.3.4 Signed-off-by: Shoichi Kaji * [stable/heapster] This will be a breaking change so we should up it by a major version Signed-off-by: Shoichi Kaji --- stable/heapster/Chart.yaml | 2 +- stable/heapster/templates/_helpers.tpl | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/stable/heapster/Chart.yaml b/stable/heapster/Chart.yaml index f17de78f1e..bf41c9e717 100644 --- a/stable/heapster/Chart.yaml +++ b/stable/heapster/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Heapster enables Container Cluster Monitoring and Performance Analysis. name: heapster -version: 0.3.3 +version: 1.0.0 appVersion: 1.5.2 home: https://github.com/kubernetes/heapster sources: diff --git a/stable/heapster/templates/_helpers.tpl b/stable/heapster/templates/_helpers.tpl index da7d0f074c..0e46552c29 100644 --- a/stable/heapster/templates/_helpers.tpl +++ b/stable/heapster/templates/_helpers.tpl @@ -9,11 +9,20 @@ 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 "heapster.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 a service name that defaults to app name.