diff --git a/library/common-test/tests/cronjob/spec_test.yaml b/library/common-test/tests/cronjob/spec_test.yaml index 1705fce747..6f75456779 100644 --- a/library/common-test/tests/cronjob/spec_test.yaml +++ b/library/common-test/tests/cronjob/spec_test.yaml @@ -41,14 +41,14 @@ tests: - it: should apply spec correctly set: cron: "*/5 * * * *" - someTZ: America/New_York + someTimezone: America/New_York workload: workload-name: enabled: true primary: true type: CronJob schedule: "{{ .Values.cron }}" - timezone: "{{ .Values.someTZ }}" + timezone: "{{ .Values.someTimezone }}" concurrencyPolicy: Allow failedJobsHistoryLimit: 2 successfulJobsHistoryLimit: 4 diff --git a/library/common/1.0.0/docs/README.md b/library/common/1.0.0/docs/README.md new file mode 100644 index 0000000000..28282a4fb3 --- /dev/null +++ b/library/common/1.0.0/docs/README.md @@ -0,0 +1,13 @@ +# Root Chart Context + +| Key | Type | Required | Helm Template | Default | Description | +| :--------------- | :------: | :------: | :-----------: | :-----: | :------------------------------------------ | +| .Values.TIMEZONE | `string` | ✅ | ❌ | `UTC` | Timezone that is used everywhere applicable | + +--- + +Examples: + +```yaml +TIMEZONE: Europe/Berlin +``` diff --git a/library/common/1.0.0/docs/workload/cronjob.md b/library/common/1.0.0/docs/workload/cronjob.md index 719aa4f618..a38fe1a4c1 100644 --- a/library/common/1.0.0/docs/workload/cronjob.md +++ b/library/common/1.0.0/docs/workload/cronjob.md @@ -1,19 +1,19 @@ # CronJob -| Key | Type | Required | Helm Template | Default | Description | -| :-------------------------------------------------- | :------: | :------: | :-----------: | :----------------: | :---------------------------------------------------- | -| workload.[workload-name].schedule | `string` | ✅ | ✅ | `""` | Define the schedule | -| workload.[workload-name].timezone | `string` | ❌ | ✅ | `{{ .Values.TZ }}` | Define the timezone | -| workload.[workload-name].concurrencyPolicy | `string` | ❌ | ✅ | `Forbid` | Define the concurrencyPolicy (Allow, Replace, Forbid) | -| workload.[workload-name].failedJobsHistoryLimit | `int` | ❌ | ❌ | `1` | Define the failedJobsHistoryLimit | -| workload.[workload-name].successfulJobsHistoryLimit | `int` | ❌ | ❌ | `3` | Define the successfulJobsHistoryLimit | -| workload.[workload-name].startingDeadlineSeconds | `int` | ❌ | ❌ | | Define the startingDeadlineSeconds | -| workload.[workload-name].completionMode | `string` | ❌ | ❌ | `NonIndexed` | Define the completionMode (Indexed, NonIndexed) | -| workload.[workload-name].backoffLimit | `int` | ❌ | ❌ | `5` | Define the backoffLimit | -| workload.[workload-name].completions | `int` | ❌ | ❌ | | Define the completions | -| workload.[workload-name].parallelism | `int` | ❌ | ❌ | `1` | Define the parallelism | -| workload.[workload-name].ttlSecondsAfterFinished | `int` | ❌ | ❌ | `120` | Define the ttlSecondsAfterFinished | -| workload.[workload-name].activeDeadlineSeconds | `int` | ❌ | ❌ | | Define the activeDeadlineSeconds | +| Key | Type | Required | Helm Template | Default | Description | +| :-------------------------------------------------- | :------: | :------: | :-----------: | :----------------------: | :---------------------------------------------------- | +| workload.[workload-name].schedule | `string` | ✅ | ✅ | `""` | Define the schedule | +| workload.[workload-name].timezone | `string` | ❌ | ✅ | `{{ .Values.TIMEZONE }}` | Define the timezone | +| workload.[workload-name].concurrencyPolicy | `string` | ❌ | ✅ | `Forbid` | Define the concurrencyPolicy (Allow, Replace, Forbid) | +| workload.[workload-name].failedJobsHistoryLimit | `int` | ❌ | ❌ | `1` | Define the failedJobsHistoryLimit | +| workload.[workload-name].successfulJobsHistoryLimit | `int` | ❌ | ❌ | `3` | Define the successfulJobsHistoryLimit | +| workload.[workload-name].startingDeadlineSeconds | `int` | ❌ | ❌ | | Define the startingDeadlineSeconds | +| workload.[workload-name].completionMode | `string` | ❌ | ❌ | `NonIndexed` | Define the completionMode (Indexed, NonIndexed) | +| workload.[workload-name].backoffLimit | `int` | ❌ | ❌ | `5` | Define the backoffLimit | +| workload.[workload-name].completions | `int` | ❌ | ❌ | | Define the completions | +| workload.[workload-name].parallelism | `int` | ❌ | ❌ | `1` | Define the parallelism | +| workload.[workload-name].ttlSecondsAfterFinished | `int` | ❌ | ❌ | `120` | Define the ttlSecondsAfterFinished | +| workload.[workload-name].activeDeadlineSeconds | `int` | ❌ | ❌ | | Define the activeDeadlineSeconds | --- @@ -32,7 +32,7 @@ workload: primary: true type: CronJob schedule: "{{ .Values.cron }}" - timezone: "{{ .Values.someTZ }}" + timezone: "{{ .Values.someTimezone }}" concurrencyPolicy: Allow failedJobsHistoryLimit: 2 successfulJobsHistoryLimit: 4 diff --git a/library/common/1.0.0/templates/lib/workload/_cronjobSpec.tpl b/library/common/1.0.0/templates/lib/workload/_cronjobSpec.tpl index e3e0f4444d..0d0a6917c7 100644 --- a/library/common/1.0.0/templates/lib/workload/_cronjobSpec.tpl +++ b/library/common/1.0.0/templates/lib/workload/_cronjobSpec.tpl @@ -8,13 +8,13 @@ objectData: failedJobsHistoryLimit: The number of failed finished jobs to retain. Defaults to 1. successfulJobsHistoryLimit: The number of successful finished jobs to retain. Defaults to 3. startingDeadlineSeconds: Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Defaults to nil. - timezone: The timezone name. Defaults to .Values.TZ. + timezone: The timezone name. Defaults to .Values.TIMEZONE +jobSpec data */}} {{- define "ix.v1.common.lib.workload.cronjobSpec" -}} {{- $objectData := .objectData -}} {{- $rootCtx := .rootCtx -}} -timeZone: {{ (tpl ($objectData.timezone | default $rootCtx.Values.TZ) $rootCtx) | quote }} +timeZone: {{ (tpl ($objectData.timezone | default $rootCtx.Values.TIMEZONE) $rootCtx) | quote }} schedule: {{ (tpl $objectData.schedule $rootCtx) | quote }} concurrencyPolicy: {{ $objectData.concurrencyPolicy | default "Forbid" }} failedJobsHistoryLimit: {{ $objectData.failedJobsHistoryLimit | default 1 }} diff --git a/library/common/1.0.0/values.yaml b/library/common/1.0.0/values.yaml index f6cb76b577..8ca52c8d15 100644 --- a/library/common/1.0.0/values.yaml +++ b/library/common/1.0.0/values.yaml @@ -44,7 +44,7 @@ ixCertificates: [] # Only for reference here ixVolumes: [] -# TODO: Docs +# TODO: Docs (for the imageName) convention # -- Image values image: # -- Image repository @@ -55,7 +55,8 @@ image: pullPolicy: IfNotPresent # TODO: Docs -TZ: UTC +TIMEZONE: UTC + # TODO: Docs # -- Security Context securityContext: @@ -166,6 +167,7 @@ workload: primary: true type: Deployment podSpec: + # TODO: Currently implementing containers: main: enabled: true @@ -235,7 +237,10 @@ serviceAccount: {} # -- (docs/rbac.md) rbac: {} -# NOTES.txt +# -- (docs/scaleExternalInterface.md) +scaleExternalInterface: [] + +# NOTES.txt TODO: Docs notes: header: | # Welcome to SCALE @@ -293,8 +298,6 @@ scaleGPU: pod-name: - container-name -# -- (docs/scaleExternalInterface.md) -scaleExternalInterface: [] # -- SCALE Certificate scaleCert: