2018-08-03 08:18:31 +00:00
|
|
|
{{/* vim: set filetype=mustache: */}}
|
2022-02-20 20:57:28 +00:00
|
|
|
|
2018-08-03 08:18:31 +00:00
|
|
|
{{/*
|
|
|
|
Expand the name of the chart.
|
|
|
|
*/}}
|
2022-02-20 20:57:28 +00:00
|
|
|
{{- define "argo-events.name" -}}
|
|
|
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
|
|
|
{{- end }}
|
2018-08-03 08:18:31 +00:00
|
|
|
|
|
|
|
{{/*
|
|
|
|
Create a default fully qualified app name.
|
|
|
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
2022-02-20 20:57:28 +00:00
|
|
|
If release name contains chart name it will be used as a full name.
|
2018-08-03 08:18:31 +00:00
|
|
|
*/}}
|
2022-02-20 20:57:28 +00:00
|
|
|
{{- define "argo-events.fullname" -}}
|
|
|
|
{{- if .Values.fullnameOverride }}
|
|
|
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
|
|
|
{{- else }}
|
|
|
|
{{- $name := default .Chart.Name .Values.nameOverride }}
|
|
|
|
{{- if contains $name .Release.Name }}
|
|
|
|
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
|
|
|
{{- else }}
|
|
|
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
2022-06-14 15:37:47 +00:00
|
|
|
|
|
|
|
{{/*
|
|
|
|
Create controller name and version as used by the chart label.
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-events.controller.fullname" -}}
|
|
|
|
{{- printf "%s-%s" (include "argo-events.fullname" .) .Values.controller.name | trunc 63 | trimSuffix "-" -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Create the name of the controller service account to use
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-events.controller.serviceAccountName" -}}
|
|
|
|
{{- if .Values.controller.serviceAccount.create -}}
|
|
|
|
{{ default (include "argo-events.controller.fullname" .) .Values.controller.serviceAccount.name }}
|
|
|
|
{{- else -}}
|
|
|
|
{{ default "default" .Values.controller.serviceAccount.name }}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Create webhook name and version as used by the chart label.
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-events.webhook.fullname" }}
|
|
|
|
{{- printf "%s-%s" (include "argo-events.fullname" .) .Values.webhook.name | trunc 63 | trimSuffix "-" -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Create the name of the webhook service account to use
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-events.webhook.serviceAccountName" -}}
|
|
|
|
{{- if .Values.webhook.serviceAccount.create -}}
|
|
|
|
{{ default (include "argo-events.webhook.fullname" .) .Values.webhook.serviceAccount.name }}
|
|
|
|
{{- else -}}
|
|
|
|
{{ default "default" .Values.webhook.serviceAccount.name }}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Create chart name and version as used by the chart label.
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-events.chart" -}}
|
|
|
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Common labels
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-events.labels" -}}
|
|
|
|
helm.sh/chart: {{ include "argo-events.chart" .context }}
|
|
|
|
{{ include "argo-events.selectorLabels" (dict "context" .context "component" .component "name" .name) }}
|
|
|
|
app.kubernetes.io/managed-by: {{ .context.Release.Service }}
|
|
|
|
app.kubernetes.io/part-of: argo-events
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Selector labels
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-events.selectorLabels" -}}
|
|
|
|
{{- if .name -}}
|
|
|
|
app.kubernetes.io/name: {{ include "argo-events.name" .context }}-{{ .name }}
|
|
|
|
{{- end }}
|
|
|
|
app.kubernetes.io/instance: {{ .context.Release.Name }}
|
|
|
|
{{- if .component }}
|
|
|
|
app.kubernetes.io/component: {{ .component }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Return the default Argo Events app version
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-events.defaultTag" -}}
|
|
|
|
{{- default .Chart.AppVersion .Values.global.image.tag }}
|
|
|
|
{{- end -}}
|