more docs and remove not used keys from a test

This commit is contained in:
Stavros kois
2023-01-24 17:35:16 +02:00
parent 4419c22efc
commit 080f9b4a75
4 changed files with 97 additions and 10 deletions

View 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
```

View File

@@ -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

View File

@@ -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