feat(hydra): add janitor cronjob

This commit is contained in:
2023-12-11 10:45:22 +01:00
parent 435597f9f1
commit d88cc2de65
4 changed files with 63 additions and 1 deletions

View File

@ -29,7 +29,7 @@ vars:
fieldref:
fieldpath: metadata.name
patchesJson6902:
patches:
- target:
group: apps
version: v1
@ -42,3 +42,9 @@ patchesJson6902:
kind: Job
name: hydra-migrate
path: patches/hydra-migrate-job.yaml
- target:
group: batch
version: v1
kind: CronJob
name: hydra-janitor
path: patches/hydra-janitor-cronjob.yaml

View File

@ -0,0 +1,21 @@
- op: add
path: "/spec/jobTemplate/spec/template/spec/containers/0/env/-"
value:
name: HYDRA_DATABASE_USER
valueFrom:
secretKeyRef:
name: hydra-postgres-user
key: username
- op: add
path: "/spec/jobTemplate/spec/template/spec/containers/0/env/-"
value:
name: HYDRA_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: hydra-postgres-user
key: password
- op: add
path: "/spec/jobTemplate/spec/template/spec/containers/0/env/-"
value:
name: DSN
value: "postgres://$(HYDRA_DATABASE_USER):$(HYDRA_DATABASE_PASSWORD)@$(HYDRA_DATABASE_SERVICE_NAME)-rw:5432/hydra?sslmode=disable"