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