Skip to content

Commit

Permalink
Add job to optionally create hydra db (#1339)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino authored Aug 20, 2024
1 parent b688547 commit 637c4ab
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plural/helm/plural/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: plural
description: A helm chart for installing plural
appVersion: 0.11.8
version: 0.10.94
version: 0.10.95
dependencies:
- name: hydra
version: 0.26.5
Expand Down
24 changes: 24 additions & 0 deletions plural/helm/plural/templates/migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,30 @@ spec:
resources:
{{- toYaml .Values.cron.resources | nindent 10 }}
{{ end }}
{{ if .Values.createHydraDb }}
---
apiVersion: batch/v1
kind: Job
metadata:
name: create-hydra-db
spec:
template:
spec:
restartPolicy: Never
serviceAccountName: plural
containers:
- name: createdb
image: postgres:14
command:
- "/bin/sh"
- "-c"
- |
psql "$POSTGRES_URL" -c "CREATE DATABASE hydra"
envFrom:
- secretRef:
name: plural-env
backoffLimit: 5
{{ end }}
---
apiVersion: batch/v1
kind: Job
Expand Down

0 comments on commit 637c4ab

Please sign in to comment.