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