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