Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: conditionally add superuser envs #2481

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

dleard
Copy link
Contributor

@dleard dleard commented Nov 16, 2024

I think there's also an issue with the superuser being in an init container & how we drop our database beforehand (which means the django auth admin tables don't exist).

This PR is just to fix the side effect of having envs in test/prod that reference a secret that isn't created in those environments, causing a container init config error on deploy. I created a stand-in secret in test to get around that for now. This PR makes those envs conditional on the dev environment.

@@ -34,6 +34,16 @@ spec:
- "create_superuser"
env:
{{- include "cas-bciers.backendEnvVars" . | nindent 12 }}
- name: DJANGO_SUPERUSER_USERNAME
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's also missing the "if -dev" toggle here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

..nevermind, it's further up!

@@ -34,6 +34,16 @@ spec:
- "create_superuser"
env:
{{- include "cas-bciers.backendEnvVars" . | nindent 12 }}
- name: DJANGO_SUPERUSER_USERNAME
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

..nevermind, it's further up!

@dleard dleard merged commit 47927a5 into develop Nov 18, 2024
40 checks passed
@dleard dleard deleted the chore/conditional-superuser-envs branch November 18, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants