Sean Condon | fe2c974 | 2022-03-25 16:42:49 +0000 | [diff] [blame] | 1 | {{/* vim: set filetype=mustache: */}}
|
| 2 | {{/*
|
| 3 | SPDX-FileCopyrightText: 2022-present Open Networking Foundation <info@opennetworking.org>
|
| 4 | SPDX-License-Identifier: Apache-2.0
|
| 5 |
|
| 6 | Expand the name of the chart.
|
| 7 | */}}
|
| 8 | {{- define "rasa-action-server.name" -}}
|
| 9 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
| 10 | {{- end -}}
|
| 11 |
|
| 12 | {{/*
|
| 13 | Create a default fully qualified app name.
|
| 14 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
| 15 | If release name contains chart name it will be used as a full name.
|
| 16 | */}}
|
| 17 | {{- define "rasa-action-server.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 | {{/*
|
| 31 | Create chart name and version as used by the chart label.
|
| 32 | */}}
|
| 33 | {{- define "rasa-action-server.chart" -}}
|
| 34 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
| 35 | {{- end -}}
|
| 36 |
|
| 37 |
|
| 38 | {{/*
|
| 39 | Common labels
|
| 40 | */}}
|
| 41 | {{- define "rasa-action-server.labels" -}}
|
| 42 | helm.sh/chart: {{ include "rasa-action-server.chart" . }}
|
| 43 | {{ include "rasa-action-server.selectorLabels" . }}
|
| 44 | {{- if .Chart.AppVersion }}
|
| 45 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
| 46 | {{- end }}
|
| 47 | app.kubernetes.io/managed-by: {{ .Release.Service }}
|
| 48 | {{- end -}}
|
| 49 |
|
| 50 | {{/*
|
| 51 | Selector labels
|
| 52 | */}}
|
| 53 | {{- define "rasa-action-server.selectorLabels" -}}
|
| 54 | app.kubernetes.io/name: {{ include "rasa-action-server.name" . }}
|
| 55 | app.kubernetes.io/instance: {{ .Release.Name }}
|
| 56 | {{- end -}}
|