[stable/memcached] add fullnameOverride option (#5140)

This commit is contained in:
Simon Wydooghe
2018-05-02 09:59:16 -07:00
committed by k8s-ci-robot
parent ebe9fc9b1e
commit a82d21abed
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: memcached
version: 2.0.4
version: 2.1.0
appVersion: 1.5.6
description: Free & open source, high-performance, distributed memory object caching
system.
+8
View File
@@ -11,6 +11,14 @@ 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).
*/}}
{{- define "memcached.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 -}}