blob: c168c7653c01a1eedc12045e3d1ac5a31f6c16e3 [file] [log] [blame]
Arrobo, Gabriel9af7a942022-09-20 12:48:06 -07001{{- /*
2
3# Copyright 2022-present Intel Corporation
4#
5# SPDX-License-Identifier: Apache-2.0
6
7*/ -}}
8
9{{/*
10Expand the name of the chart.
11*/}}
12{{- define "network-test.name" -}}
13{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
14{{- end }}
15
16{{/*
17Create a default fully qualified app name.
18We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
19If release name contains chart name it will be used as a full name.
20*/}}
21{{- define "network-test.fullname" -}}
22{{- if .Values.fullnameOverride }}
23{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
24{{- else }}
25{{- $name := default .Chart.Name .Values.nameOverride }}
26{{- if contains $name .Release.Name }}
27{{- .Release.Name | trunc 63 | trimSuffix "-" }}
28{{- else }}
29{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
30{{- end }}
31{{- end }}
32{{- end }}
33
34{{/*
35Create chart name and version as used by the chart label.
36*/}}
37{{- define "network-test.chart" -}}
38{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
39{{- end }}
40
41{{/*
42Common labels
43*/}}
44{{- define "network-test.labels" -}}
45helm.sh/chart: {{ include "network-test.chart" . }}
46{{ include "network-test.selectorLabels" . }}
47{{- if .Chart.AppVersion }}
48app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
49{{- end }}
50app.kubernetes.io/managed-by: {{ .Release.Service }}
51{{- end }}
52
53{{/*
54Selector labels
55*/}}
56{{- define "network-test.selectorLabels" -}}
57app.kubernetes.io/name: {{ include "network-test.name" . }}
58app.kubernetes.io/instance: {{ .Release.Name }}
59{{- end }}