2021-05-21 12:19:05 +00:00
|
|
|
{{/* vim: set filetype=mustache: */}}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Create argo workflows server name and version as used by the chart label.
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-workflows.server.fullname" -}}
|
|
|
|
{{- printf "%s-%s" (include "argo-workflows.fullname" .) .Values.server.name | trunc 63 | trimSuffix "-" -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Create controller name and version as used by the chart label.
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-workflows.controller.fullname" -}}
|
|
|
|
{{- printf "%s-%s" (include "argo-workflows.fullname" .) .Values.controller.name | trunc 63 | trimSuffix "-" -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Expand the name of the chart.
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-workflows.name" -}}
|
|
|
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
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).
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-workflows.fullname" -}}
|
|
|
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
|
|
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Create chart name and version as used by the chart label.
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-workflows.chart" -}}
|
|
|
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Common labels
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-workflows.labels" -}}
|
|
|
|
helm.sh/chart: {{ include "argo-workflows.chart" .context }}
|
|
|
|
{{ include "argo-workflows.selectorLabels" (dict "context" .context "component" .component "name" .name) }}
|
|
|
|
app.kubernetes.io/managed-by: {{ .context.Release.Service }}
|
|
|
|
app.kubernetes.io/part-of: argo-workflows
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Selector labels
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-workflows.selectorLabels" -}}
|
|
|
|
{{- if .name -}}
|
|
|
|
app.kubernetes.io/name: {{ include "argo-workflows.name" .context }}-{{ .name }}
|
|
|
|
{{ end -}}
|
|
|
|
app.kubernetes.io/instance: {{ .context.Release.Name }}
|
|
|
|
{{- if .component }}
|
|
|
|
app.kubernetes.io/component: {{ .component }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Create the name of the server service account to use
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-workflows.serverServiceAccountName" -}}
|
|
|
|
{{- if .Values.server.serviceAccount.create -}}
|
2021-05-27 16:33:22 +00:00
|
|
|
{{ default (include "argo-workflows.server.fullname" .) .Values.server.serviceAccount.name }}
|
2021-05-21 12:19:05 +00:00
|
|
|
{{- else -}}
|
|
|
|
{{ default "default" .Values.server.serviceAccount.name }}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Create the name of the controller service account to use
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-workflows.controllerServiceAccountName" -}}
|
|
|
|
{{- if .Values.controller.serviceAccount.create -}}
|
2021-05-27 16:33:22 +00:00
|
|
|
{{ default (include "argo-workflows.controller.fullname" .) .Values.controller.serviceAccount.name }}
|
2021-05-21 12:19:05 +00:00
|
|
|
{{- else -}}
|
|
|
|
{{ default "default" .Values.controller.serviceAccount.name }}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Return the appropriate apiVersion for ingress
|
|
|
|
*/}}
|
|
|
|
{{- define "argo-workflows.ingress.apiVersion" -}}
|
|
|
|
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.Version -}}
|
|
|
|
{{- print "extensions/v1beta1" -}}
|
|
|
|
{{- else if semverCompare "<1.19-0" .Capabilities.KubeVersion.Version -}}
|
|
|
|
{{- print "networking.k8s.io/v1beta1" -}}
|
|
|
|
{{- else -}}
|
|
|
|
{{- print "networking.k8s.io/v1" -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|