-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
651dbd9
commit 4cfd32f
Showing
8 changed files
with
244 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{{- define "generic-chart.cronjob.tpl" }} | ||
{{ $ctx := .ctx }} | ||
{{ $cronJob := .cronJob }} | ||
apiVersion: {{ include "generic-chart.capabilities.cronjob.apiVersion" $ctx }} | ||
kind: CronJob | ||
metadata: | ||
name: {{ include "generic-chart.fullname" $ctx }}{{ include "generic-chart.getSuffix" $cronJob }} | ||
labels: | ||
{{- include "generic-chart.labels" $ctx | nindent 4 }} | ||
{{- with $ctx.labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }}{{- /* labels */}} | ||
{{- with $ctx.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }}{{- /* annotations */}} | ||
spec: | ||
schedule: {{ required "A valid cronJob.schedule entry required" $cronJob.schedule | quote }} | ||
suspend: {{ ($cronJob).suspend }} | ||
{{- if ($cronJob).startingDeadlineSeconds }} | ||
startingDeadlineSeconds: {{ ($cronJob).startingDeadlineSeconds }} | ||
{{- end }} | ||
{{- if ($cronJob).concurrencyPolicy }} | ||
concurrencyPolicy: {{ ($cronJob).concurrencyPolicy }} | ||
{{- end }} | ||
{{- if ($cronJob).successfulJobsHistoryLimit }} | ||
successfulJobsHistoryLimit: {{ ($cronJob).successfulJobsHistoryLimit }} | ||
{{- end }} | ||
{{- if ($cronJob).failedJobsHistoryLimit }} | ||
failedJobsHistoryLimit: {{ ($cronJob).failedJobsHistoryLimit }} | ||
{{- end }} | ||
jobTemplate: | ||
{{- include "generic-chart.job_spec.tpl" . | nindent 4 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- define "generic-chart.job.tpl" -}} | ||
{{ $ctx := .ctx }} | ||
{{ $job := .job }} | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: {{ include "generic-chart.fullname" $ctx }}{{ include "generic-chart.getSuffix" $job }} | ||
labels: | ||
{{- include "generic-chart.labels" $ctx | nindent 4 }} | ||
{{- with $ctx.labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }}{{- /* labels */}} | ||
{{- with $ctx.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }}{{- /* annotations */}} | ||
{{ include "generic-chart.job_spec.tpl" . }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{{- define "generic-chart.job_spec.tpl" -}} | ||
{{ $ctx := .ctx }} | ||
{{ $job := .job }} | ||
spec: | ||
{{- if ($job).backoffLimit }} | ||
backoffLimit: {{ ($job).backoffLimit }} | ||
{{- end }} | ||
{{- if ($job).backoffLimitPerIndex }} | ||
backoffLimitPerIndex: {{ ($job).backoffLimitPerIndex }} | ||
{{- end }} | ||
{{- if ($job).podFailurePolicy }} | ||
podFailurePolicy: {{ ($job).podFailurePolicy }} | ||
{{- end }} | ||
{{- if ($job).completions }} | ||
completions: {{ ($job).completions }} | ||
{{- end }} | ||
{{- if ($job).completionMode }} | ||
completionMode: {{ ($job).completionMode }} | ||
{{- end }} | ||
{{- if ($job).parallelism }} | ||
parallelism: {{ ($job).parallelism }} | ||
{{- end }} | ||
template: | ||
{{- include "generic-chart.pod_spec.tpl" $ctx | nindent 4 }} | ||
{{- with ($job).restartPolicy }} | ||
restartPolicy: {{ . }} | ||
{{- end }}{{- /* restartPolicy */}} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{{- define "generic-chart.pod_spec.tpl" -}} | ||
{{- /* | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
*/ -}} | ||
metadata: | ||
{{- with .Values.podAnnotations }} | ||
annotations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }}{{- /* podAnnotations */}} | ||
labels: | ||
{{- include "generic-chart.selectorLabels" . | nindent 8 }} | ||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }}{{- /* imagePullSecrets */}} | ||
serviceAccountName: {{ include "generic-chart.serviceAccountName" . }} | ||
{{- with .Values.podSecurityContext }} | ||
securityContext: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }}{{- /* podSecurityContext */}} | ||
{{- with .Values.priorityClassName }} | ||
priorityClassName: {{ . }} | ||
{{- end }}{{- /* priorityClassName */}} | ||
{{- with .Values.terminationGracePeriodSeconds }} | ||
terminationGracePeriodSeconds: {{ . | default 60 }} | ||
{{- end }}{{- /* terminationGracePeriodSeconds */}} | ||
enableServiceLinks: {{ .Values.enableServiceLinks | default false }} | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }}{{- /* nodeSelector */}} | ||
{{- if .Values.affinity }} | ||
affinity: | ||
{{- include "tplvalues.render" ( dict "value" .Values.affinity "context" . ) | nindent 8 }} | ||
{{- end }}{{- /* affinity */}} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }}{{- /* tolerations */}} | ||
{{- end }} {{- /* define */}} |
Oops, something went wrong.