mirror of
https://github.com/truenas/charts.git
synced 2026-04-26 19:42:14 +08:00
* Adapt charts CI and improve/fix common * add check on permissions contaienr * add postgres template * update comments * Update create_app.sh * add check * update script * auto gen item.yaml from Chart,yaml * rename readme on dest * duplicate readme from the same source * correct comment * reoder * remove extra space * keep both README and app-readme * update regex, to also allow 2 letter names, which is also valid * No need to check host network if there aren't any pod values * use same pattern as the pod.name label (not prepending release-name * update deps * add chart dirs to ci * Add a validation to check if there is any yaml errors after merging files * update charts path on ci * common/1.0.0/ -> common/ * update common-test dep path * temp update create_app script * make permissions container name configurable, incase we want to change order of execution * update naming convention * fix typo and a missed name change * do not allow `--` in names
25 lines
2.0 KiB
Smarty
25 lines
2.0 KiB
Smarty
{{/* Job Spec */}}
|
|
{{/* Call this template:
|
|
{{ include "ix.v1.common.lib.workload.jobSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) -}}
|
|
rootCtx: The root context of the chart.
|
|
objectData:
|
|
backoffLimit: The number of retries before marking this job failed. Defaults to 6.
|
|
completions: The desired number of successfully finished pods the job should be run with. Defaults to 1.
|
|
parallelism: The maximum desired number of pods the job should run at any given time. Defaults to 1.
|
|
activeDeadlineSeconds: Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer. If set to nil, the job is never terminated due to timeout.
|
|
ttlSecondsAfterFinished: TTLSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. This field is alpha-level and is only honored by servers that enable the TTLAfterFinished feature.
|
|
completionMode: CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.
|
|
*/}}
|
|
{{- define "ix.v1.common.lib.workload.jobSpec" -}}
|
|
{{- $objectData := .objectData -}}
|
|
{{- $rootCtx := .rootCtx -}}
|
|
backoffLimit: {{ $objectData.backoffLimit | default 5 }}
|
|
completionMode: {{ $objectData.completionMode | default "NonIndexed" }}
|
|
completions: {{ $objectData.completions | default nil }}
|
|
parallelism: {{ $objectData.parallelism | default 1 }}
|
|
ttlSecondsAfterFinished: {{ $objectData.ttlSecondsAfterFinished | default 120 }}
|
|
{{- with $objectData.activeDeadlineSeconds }}
|
|
activeDeadlineSeconds: {{ . }}
|
|
{{- end -}}
|
|
{{- end -}}
|