blob: aabdc983a6f2919fac570954c7d658f3066b3ac2 [file] [log] [blame]
Wei-Yu Chen0f12b9c2019-04-18 11:12:59 -07001{{- /*
2# Copyright 2018-present Open Networking Foundation
3# Copyright 2018 Intel Corporation
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16*/ -}}
17
18{{/* vim: set filetype=mustache: */}}
19{{/*
20Expand the name of the chart.
21*/}}
22{{- define "mcord-setup.name" -}}
23{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
24{{- end -}}
25
26{{/*
27Create a default fully qualified app name.
28We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
29If release name contains chart name it will be used as a full name.
30*/}}
31{{- define "mcord-setup.fullname" -}}
32{{- if .Values.fullnameOverride -}}
33{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
34{{- else -}}
35{{- $name := default .Chart.Name .Values.nameOverride -}}
36{{- if contains $name .Release.Name -}}
37{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
38{{- else -}}
39{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
40{{- end -}}
41{{- end -}}
42{{- end -}}
43
44{{/*
45Create chart name and version as used by the chart label.
46*/}}
47{{- define "mcord-setup.chart" -}}
48{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
49{{- end -}}