diff --git a/CHANGELOG.md b/CHANGELOG.md index 2526e00..ac6634d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to ### Added +- 🧱(helm) disable createsuperuser job by setting #863 - 🔒️(passwords) add validators for production #850 - ✨(domains) allow to re-run check on domain if status is failed - ✨(organization) add `is_active` field diff --git a/src/helm/desk/Chart.yaml b/src/helm/desk/Chart.yaml index fdf6d1f..8b9451e 100644 --- a/src/helm/desk/Chart.yaml +++ b/src/helm/desk/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v2 type: application name: desk -version: 0.0.5 +version: 0.0.6 diff --git a/src/helm/desk/README.md b/src/helm/desk/README.md index c480011..633f2d5 100644 --- a/src/helm/desk/README.md +++ b/src/helm/desk/README.md @@ -82,6 +82,8 @@ | `backend.extraVolumeMounts` | Additional volumes to mount on the backend. | `[]` | | `backend.extraVolumes` | Additional volumes to mount on the backend. | `[]` | | `backend.createsuperuser.command` | The command to create the django super user | `python manage.py createsuperuser --username admin@example.com --password admin` | +| `backend.createsuperuser.enabled` | Whether to create the superuser job | `true` | +| `backend.createsuperuser.restartPolicy` | The restart policy for the job | `Never` | ### frontend diff --git a/src/helm/desk/templates/backend_job_createsuperuser.yaml b/src/helm/desk/templates/backend_job_createsuperuser.yaml index 0b0c1ab..492d828 100644 --- a/src/helm/desk/templates/backend_job_createsuperuser.yaml +++ b/src/helm/desk/templates/backend_job_createsuperuser.yaml @@ -1,3 +1,4 @@ +{{- if .Values.backend.createsuperuser.enabled -}} {{- $envVars := include "desk.common.env" (list . .Values.backend) -}} {{- $fullName := include "desk.backend.fullname" . -}} {{- $component := "backend" -}} @@ -120,3 +121,4 @@ spec: emptyDir: {} {{- end }} {{- end }} +{{- end -}} diff --git a/src/helm/desk/values.yaml b/src/helm/desk/values.yaml index aaa5daf..80a989e 100644 --- a/src/helm/desk/values.yaml +++ b/src/helm/desk/values.yaml @@ -178,8 +178,12 @@ backend: extraVolumes: [] ## @param backend.createsuperuser.command The command to create the django super user + ## @param backend.createsuperuser.enabled Whether to create the superuser job + ## @param backend.createsuperuser.restartPolicy The restart policy for the job createsuperuser: + enabled: true command: python manage.py createsuperuser --username admin@example.com --password admin + restartPolicy: Never ## @section frontend frontend: