blob: 234b8d3c7fcc0f5d050d8364c9438b5da9226e70 [file] [log] [blame]
William Kurkian0a5988a2018-09-11 15:44:15 -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{{- if .Values.fullnameOverride -}}
30{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
31{{- else -}}
32{{- $name := default .Chart.Name .Values.nameOverride -}}
33{{- if contains $name .Release.Name -}}
34{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
35{{- else -}}
36{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
37{{- end -}}
38{{- end -}}
39{{- end -}}
40
41{{/*
42Create chart name and version as used by the chart label.
43*/}}
44{{- define "ves-agent.chart" -}}
45{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
46{{- end -}}