forked from flant/helm-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_apps-jobs.tpl
30 lines (23 loc) · 966 Bytes
/
_apps-jobs.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{{- define "apps-jobs" }}
{{- $ := index . 0 }}
{{- $RelatedScope := index . 1 }}
{{- if not (kindIs "invalid" $RelatedScope) }}
{{- $_ := set $RelatedScope "__GroupVars__" (dict "type" "apps-jobs" "name" "apps-jobs") }}
{{- include "apps-utils.renderApps" (list $ $RelatedScope) }}
{{- end -}}
{{- end -}}
{{- define "apps-jobs.render" }}
{{- $ := . }}
{{- $_ := set $ "CurrentJob" $.CurrentApp }}
{{- with $.CurrentApp }}
{{- if not .containers }}
{{- fail (printf "Установлено значение enabled для не настроенной '%s' в %s джобы!" $.CurrentApp.name "apps-jobs") }}
{{- end }}
apiVersion: batch/v1
kind: Job
{{- include "apps-helpers.metadataGenerator" (list $ .) -}}
{{- include "apps-helpers.jobTemplate" (list $ .) -}}
{{- include "apps-components.generateConfigMapsAndSecrets" $ -}}
{{- include "apps-components.verticalPodAutoscaler" (list $ . .verticalPodAutoscaler "Job") -}}
{{- end }}
{{- end }}