|
| 1 | +{{/* |
| 2 | +Expand the name of the chart. |
| 3 | +*/}} |
| 4 | +{{- define "kubeflow-pipelines.name" -}} |
| 5 | +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} |
| 6 | +{{- end }} |
| 7 | + |
| 8 | +{{/* |
| 9 | +Create a default fully qualified app name. |
| 10 | +*/}} |
| 11 | +{{- define "kubeflow-pipelines.fullname" -}} |
| 12 | +{{- if .Values.fullnameOverride }} |
| 13 | +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} |
| 14 | +{{- else }} |
| 15 | +{{- $name := default .Chart.Name .Values.nameOverride }} |
| 16 | +{{- if contains $name .Release.Name }} |
| 17 | +{{- .Release.Name | trunc 63 | trimSuffix "-" }} |
| 18 | +{{- else }} |
| 19 | +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} |
| 20 | +{{- end }} |
| 21 | +{{- end }} |
| 22 | +{{- end }} |
| 23 | + |
| 24 | +{{/* |
| 25 | +Create chart name and version as used by the chart label. |
| 26 | +*/}} |
| 27 | +{{- define "kubeflow-pipelines.chart" -}} |
| 28 | +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} |
| 29 | +{{- end }} |
| 30 | + |
| 31 | +{{/* |
| 32 | +Common labels |
| 33 | +*/}} |
| 34 | +{{- define "kubeflow-pipelines.labels" -}} |
| 35 | +helm.sh/chart: {{ include "kubeflow-pipelines.chart" . }} |
| 36 | +{{ include "kubeflow-pipelines.selectorLabels" . }} |
| 37 | +{{- if .Chart.AppVersion }} |
| 38 | +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} |
| 39 | +{{- end }} |
| 40 | +app.kubernetes.io/managed-by: {{ .Release.Service }} |
| 41 | +app.kubernetes.io/part-of: kubeflow |
| 42 | +{{- end }} |
| 43 | + |
| 44 | +{{/* |
| 45 | +Selector labels |
| 46 | +*/}} |
| 47 | +{{- define "kubeflow-pipelines.selectorLabels" -}} |
| 48 | +app.kubernetes.io/name: {{ include "kubeflow-pipelines.name" . }} |
| 49 | +app.kubernetes.io/instance: {{ .Release.Name }} |
| 50 | +{{- end }} |
| 51 | + |
| 52 | + |
| 53 | +{{/* |
| 54 | +ServiceAccount annotations (for IRSA and custom annotations) |
| 55 | +*/}} |
| 56 | +{{- define "kubeflow-pipelines.serviceaccount-annotations" -}} |
| 57 | +{{- with .Values.serviceAccount.annotations }} |
| 58 | +{{- toYaml . | nindent 0 }} |
| 59 | +{{- end }} |
| 60 | +{{- end }} |
| 61 | + |
| 62 | +{{/* |
| 63 | +Namespace helper |
| 64 | +*/}} |
| 65 | +{{- define "kubeflow-pipelines.namespace" -}} |
| 66 | +{{- .Values.namespace.name | default "kubeflow" }} |
| 67 | +{{- end }} |
| 68 | + |
| 69 | +{{/* |
| 70 | +Compute checksum for config resources |
| 71 | +*/}} |
| 72 | +{{- define "kubeflow-pipelines.config-checksum" -}} |
| 73 | +checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} |
| 74 | +checksum/secret: {{ include (print $.Template.BasePath "/externalsecret.yaml") . | sha256sum }} |
| 75 | +{{- end }} |
0 commit comments