blob: cd538cd3ed76800300325591e31bc9cbbea3c52b [file] [log] [blame]
William Kurkian382dc5c2018-09-11 15:59:06 -04001# 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{{/*
17Expand the name of the chart.
18*/}}
19{{- define "ves-agent.name" -}}
20{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
21{{- end -}}
22
23{{/*
24Create a default fully qualified app name.
25We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
26If 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{{/*
38Create 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 -}}