blob: a741f0de22056ab6843208b858d597478c295606 [file] [log] [blame]
puthuparambil.aditya7edc7952020-10-01 12:06:33 +01001{{/* vim: set filetype=mustache: */}}
2{{/*
3Expand the name of the chart.
4*/}}
5{{- define "policy-models-simulator.name" -}}
6{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7{{- end -}}
8
9{{/*
10Create a default fully qualified app name.
11We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12If release name contains chart name it will be used as a full name.
13*/}}
14{{- define "policy-models-simulator.fullname" -}}
15{{- if .Values.fullnameOverride -}}
16{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17{{- else -}}
18{{- $name := default .Chart.Name .Values.nameOverride -}}
19{{- if contains $name .Release.Name -}}
20{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21{{- else -}}
22{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
23{{- end -}}
24{{- end -}}
25{{- end -}}
26
27{{/*
28Create chart name and version as used by the chart label.
29*/}}
30{{- define "policy-models-simulator.chart" -}}
31{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
32{{- end -}}
33
34{{/*
35Common labels
36*/}}
37{{- define "policy-models-simulator.labels" -}}
38app.kubernetes.io/name: {{ include "policy-models-simulator.name" . }}
39helm.sh/chart: {{ include "policy-models-simulator.chart" . }}
40app.kubernetes.io/instance: {{ .Release.Name }}
41{{- if .Chart.AppVersion }}
42app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
43{{- end }}
44app.kubernetes.io/managed-by: {{ .Release.Service }}
45{{- end -}}
46
47{{/*
48Create the name of the service account to use
49*/}}
50{{- define "policy-models-simulator.serviceAccountName" -}}
51{{- if .Values.serviceAccount.create -}}
52 {{ default (include "policy-models-simulator.fullname" .) .Values.serviceAccount.name }}
53{{- else -}}
54 {{ default "default" .Values.serviceAccount.name }}
55{{- end -}}
56{{- end -}}