[stable/mariadb] Add support for fullnameOverride (#10590)

Signed-off-by: Eldad Assis <eldada@jfrog.com>
This commit is contained in:
Eldad Assis
2019-01-14 03:40:37 -08:00
committed by Kubernetes Prow Robot
parent 5b0224d570
commit 5bc49681cd
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: mariadb
version: 5.4.1
version: 5.4.2
appVersion: 10.1.37
description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster.
keywords:
+9
View File
@@ -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 "mariadb.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "master.fullname" -}}
{{- if .Values.replication.enabled -}}