feat(hydra): add janitor cronjob

This commit is contained in:
wpetit 2023-12-11 10:45:22 +01:00
parent 435597f9f1
commit 5f92884182
2 changed files with 38 additions and 0 deletions

View File

@ -9,6 +9,7 @@ resources:
- ./resources/hydra-serviceaccount.yaml - ./resources/hydra-serviceaccount.yaml
- ./resources/hydra-migrate-job.yaml - ./resources/hydra-migrate-job.yaml
- ./resources/hydra-maester - ./resources/hydra-maester
- ./resources/hydra-janitor-cronjob.yaml
secretGenerator: secretGenerator:
- name: hydra-secret - name: hydra-secret

View File

@ -0,0 +1,37 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: hydra-janitor
labels:
app.kubernetes.io/name: hydra-janitor
spec:
concurrencyPolicy: Forbid
schedule: "* * * * *"
jobTemplate:
spec:
template:
metadata:
labels:
app.kubernetes.io/name: hydra-janitor
spec:
restartPolicy: OnFailure
serviceAccountName: hydra-sa
containers:
- name: janitor
image: reg.cadoles.com/proxy_cache/oryd/hydra:v2.0.3
envFrom:
- configMapRef:
name: hydra-env
imagePullPolicy: IfNotPresent
command: ["hydra"]
args:
- --read-from-env
- janitor
- --grants
- --requests
- --tokens
- --batch-size
- "100"
- --limit
- "10000"
resources: {}