mirror of
https://github.com/suitenumerique/docs.git
synced 2026-09-26 19:45:01 +02:00
🔧(helm) allow to disable the createsuperuser job
The createsuperuser job is always run. We want to allow to disable it, there is no need to run this command on every deployment.
This commit is contained in:
@@ -146,6 +146,7 @@
|
||||
| `backend.service.annotations` | Annotations to add to the backend Service | `{}` |
|
||||
| `backend.migrate.command` | backend migrate command | `["/bin/sh","-c","attempt=0\nuntil output=$(python manage.py check --database default 2>&1)\ndo\n attempt=$((attempt + 1))\n echo \"Database check failed (attempt $attempt), retrying in 2s:\"\n echo \"$output\"\n sleep 2\ndone\n\necho \"Database is ready\"\n\npython manage.py migrate --no-input\n"]` |
|
||||
| `backend.migrate.restartPolicy` | backend migrate job restart policy | `Never` |
|
||||
| `backend.createsuperuser.enabled` | enable or not this job. | `true` |
|
||||
| `backend.createsuperuser.command` | backend migrate command | `["/bin/sh","-c","attempt=0\nuntil output=$(python manage.py check --database default 2>&1)\ndo\n attempt=$((attempt + 1))\n echo \"Database check failed (attempt $attempt), retrying in 2s:\"\n echo \"$output\"\n sleep 2\ndone\n\necho \"Database is ready\"\n\npython manage.py createsuperuser --email $DJANGO_SUPERUSER_EMAIL --password $DJANGO_SUPERUSER_PASSWORD\n"]` |
|
||||
| `backend.createsuperuser.restartPolicy` | backend migrate job restart policy | `Never` |
|
||||
| `backend.job` | job dedicated to run a random management command, for example after a deployment | |
|
||||
@@ -247,7 +248,9 @@
|
||||
| `frontend.pdb.enabled` | Enable pdb on frontend | `true` |
|
||||
| `frontend.serviceAccountName` | Optional service account name to use for frontend pods | `nil` |
|
||||
| `frontend.robotsTxt.enabled` | Enable serving a custom robots.txt file from the frontend, e.g. to disallow indexing of non-production instances | `false` |
|
||||
| `frontend.robotsTxt.content` | Content of the robots.txt file | `"User-agent: *\nAllow: /\n"`|
|
||||
| `frontend.robotsTxt.content` | Content of the robots.txt file | `User-agent: *
|
||||
Allow: /
|
||||
` |
|
||||
|
||||
### posthog
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{{- if .Values.backend.createsuperuser.enabled -}}
|
||||
{{- $envVars := include "impress.common.env" (list . .Values.backend) -}}
|
||||
{{- $fullName := include "impress.backend.fullname" . -}}
|
||||
{{- $component := "backend" -}}
|
||||
@@ -138,3 +139,4 @@ spec:
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -423,9 +423,11 @@ backend:
|
||||
python manage.py migrate --no-input
|
||||
restartPolicy: Never
|
||||
|
||||
## @param backend.createsuperuser.enabled enable or not this job.
|
||||
## @param backend.createsuperuser.command backend migrate command
|
||||
## @param backend.createsuperuser.restartPolicy backend migrate job restart policy
|
||||
createsuperuser:
|
||||
enabled: true
|
||||
command:
|
||||
- "/bin/sh"
|
||||
- "-c"
|
||||
|
||||
Reference in New Issue
Block a user