blob: bb84c3369b6ed1a2d4f6d4f94ab26b954492f6a2 [file] [log] [blame]
Scott Bakerc9d3d842021-09-17 11:32:53 -07001{{/* vim: set filetype=mustache: */}}
2{{/*
3SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
Sean Condon160ec1d2022-02-08 12:58:25 +00004SPDX-License-Identifier: Apache-2.0
Scott Bakerc9d3d842021-09-17 11:32:53 -07005
6Expand the name of the chart.
7*/}}
8{{- define "aether.name" -}}
9{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
10{{- end -}}
11
12{{/*
13Create a default fully qualified app name.
14We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
15If release name contains chart name it will be used as a full name.
16*/}}
17{{- define "aether.fullname" -}}
18{{- if contains "config-model-aether" .Release.Name -}}
19{{- printf "%s-%s" .Release.Name .Chart.AppVersion | trunc 63 | trimSuffix "-" -}}
20{{- else -}}
21{{- printf "%s-%s-config-model-aether" .Release.Name .Chart.AppVersion | trunc 63 | trimSuffix "-" -}}
22{{- end -}}
23{{- end -}}
24
25{{/*
26Create chart name and version as used by the chart label.
27*/}}
28{{- define "aether.chart" -}}
29{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
30{{- end -}}
31
32
33{{/*
34Common labels
35*/}}
36{{- define "aether.labels" -}}
37helm.sh/chart: {{ include "aether.chart" . }}
38{{ include "aether.selectorLabels" . }}
39{{- if .Chart.AppVersion }}
40app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41{{- end }}
42app.kubernetes.io/managed-by: {{ .Release.Service }}
43{{- end -}}
44
45{{/*
46Selector labels
47*/}}
48{{- define "aether.selectorLabels" -}}
49app.kubernetes.io/name: {{ include "aether.name" . }}
50app.kubernetes.io/instance: {{ .Release.Name }}
51{{- end -}}
52}