blob: e8fd9da6197aeb0e9ceb68f9234600ec278077bb [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 "subscriber-proxy.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 "subscriber-proxy.fullname" -}}
18{{- if .Values.fullnameOverride -}}
19{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
20{{- else -}}
21{{- $name := default .Chart.Name .Values.nameOverride -}}
22{{- if contains $name .Release.Name -}}
23{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
24{{- else -}}
25{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
26{{- end -}}
27{{- end -}}
28{{- end -}}
29
30{{/*
31Create chart name and version as used by the chart label.
32*/}}
33{{- define "subscriber-proxy.chart" -}}
34{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
35{{- end -}}
36
37
38{{/*
39Common labels
40*/}}
41{{- define "subscriber-proxy.labels" -}}
42helm.sh/chart: {{ include "subscriber-proxy.chart" . }}
43{{ include "subscriber-proxy.selectorLabels" . }}
44{{- if .Chart.AppVersion }}
45app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
46{{- end }}
47app.kubernetes.io/managed-by: {{ .Release.Service }}
48{{- end -}}
49
50{{/*
51Selector labels
52*/}}
53{{- define "subscriber-proxy.selectorLabels" -}}
54app.kubernetes.io/name: {{ include "subscriber-proxy.name" . }}
55app.kubernetes.io/instance: {{ .Release.Name }}
56{{- end -}}
Amit Wankhede38437412021-11-22 11:11:07 -060057
58{{/*
59Create the name of the service account to use
60*/}}
61{{- define "aether-roc-gui.serviceAccountName" -}}
62{{- if .Values.serviceAccount.create -}}
63 {{ default (include "subscriber-proxy.fullname" .) .Values.serviceAccount.name }}
64{{- else -}}
65 {{ default "default" .Values.serviceAccount.name }}
66{{- end -}}
67{{- end -}}
68
69