mirror of
https://github.com/truenas/charts.git
synced 2026-06-16 06:58:45 +08:00
more docs and remove not used keys from a test
This commit is contained in:
97
docs/common/values/jobs-cronjobs.md
Normal file
97
docs/common/values/jobs-cronjobs.md
Normal file
@@ -0,0 +1,97 @@
|
||||
# Jobs - CronJobs
|
||||
|
||||
## Key: jobs
|
||||
|
||||
Info:
|
||||
|
||||
- Type: `dict`
|
||||
- Default `{}`
|
||||
- Helm Template: ✅|❌
|
||||
- Supports almost every key the main container supports,
|
||||
except probes and lifecycle hooks.
|
||||
|
||||
Can be defined in:
|
||||
|
||||
- `.Values`.jobs
|
||||
|
||||
---
|
||||
|
||||
For each (cron)job under `jobs` it will spin up a Job or CronJob.
|
||||
|
||||
> Under `container.[container-name]` you can use all keys that you would use
|
||||
> in a normal container. Except `probes` and `lifecycle` hooks.
|
||||
|
||||
Examples:
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
job-name:
|
||||
enabled: true
|
||||
labels: {}
|
||||
annotations: {}
|
||||
backoffLimit: 1
|
||||
ttlSecondsAfterFinished: 100
|
||||
completionMode: NonIndexed
|
||||
activeDeadLineSeconds: 120
|
||||
parallelism: 2
|
||||
completions: 1
|
||||
podSpec:
|
||||
podSecurityContext:
|
||||
fsGroup: 1000
|
||||
containers:
|
||||
main:
|
||||
imageSelector: imageDict
|
||||
env:
|
||||
var: blabla
|
||||
cron-job-name:
|
||||
enabled: true
|
||||
labels: {}
|
||||
annotations: {}
|
||||
# All job options still go here
|
||||
cron:
|
||||
enabled: true
|
||||
schedule: "* * * * *"
|
||||
timezone: UTC
|
||||
failedJobsHistoryLimit: 2
|
||||
successfulJobsHistoryLimit: 3
|
||||
startingDeadlineSeconds: 5
|
||||
podSpec:
|
||||
podSecurityContext:
|
||||
fsGroup: 1000
|
||||
containers:
|
||||
main:
|
||||
imageSelector: imageDict
|
||||
env:
|
||||
var: blabla
|
||||
```
|
||||
|
||||
---
|
||||
---
|
||||
|
||||
## Stand alone Jobs - Cron Jobs
|
||||
|
||||
We can also define jobs and cronjobs that are standalone.
|
||||
No "main" pod required.
|
||||
|
||||
`podSpec` now goes into `.Values`
|
||||
|
||||
Examples:
|
||||
|
||||
```yaml
|
||||
controller:
|
||||
type: Job
|
||||
labels: {}
|
||||
annotations: {}
|
||||
backoffLimit: 1
|
||||
ttlSecondsAfterFinished: 100
|
||||
completionMode: NonIndexed
|
||||
activeDeadLineSeconds: 120
|
||||
parallelism: 2
|
||||
completions: 1
|
||||
|
||||
podSecurityContext:
|
||||
fsGroup: 1000
|
||||
|
||||
env:
|
||||
var: blabla
|
||||
```
|
||||
@@ -7,7 +7,6 @@ tests:
|
||||
set:
|
||||
controller:
|
||||
type: Job
|
||||
schedule: "*/5 * * * *"
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
@@ -21,7 +20,6 @@ tests:
|
||||
set:
|
||||
controller:
|
||||
type: Job
|
||||
schedule: "* * * * *"
|
||||
podSecurityContext:
|
||||
fsGroup: 0
|
||||
fsGroupChangePolicy: Always
|
||||
@@ -41,7 +39,6 @@ tests:
|
||||
set:
|
||||
controller:
|
||||
type: Job
|
||||
schedule: "* * * * *"
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
@@ -69,7 +66,6 @@ tests:
|
||||
set:
|
||||
controller:
|
||||
type: Job
|
||||
schedule: "* * * * *"
|
||||
some_string: a_string
|
||||
some_int: 123
|
||||
some_bool: false
|
||||
@@ -140,7 +136,6 @@ tests:
|
||||
set:
|
||||
controller:
|
||||
type: Job
|
||||
schedule: "* * * * *"
|
||||
persistence:
|
||||
volume0:
|
||||
type: pvc
|
||||
|
||||
@@ -408,8 +408,3 @@ volumeClaimTemplates: {}
|
||||
# mountPath: /data
|
||||
# accessMode: "ReadWriteOnce"
|
||||
# size: 1Gi
|
||||
|
||||
# TODO: Add docs for:
|
||||
# - *xxContainers
|
||||
# - jobs and cronjobs running with a main pod
|
||||
# - jobs and cronjobs running standalone
|
||||
|
||||
Reference in New Issue
Block a user