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