Skip to content

Commit

Permalink
chore: Remove config map in favour of external secret
Browse files Browse the repository at this point in the history
  • Loading branch information
microamp committed Aug 4, 2024
1 parent 61b2de4 commit 773fcd3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 21 deletions.
9 changes: 0 additions & 9 deletions k8s/iabweb/django-config.yaml

This file was deleted.

1 change: 0 additions & 1 deletion k8s/iabweb/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ configMapGenerator:
- nginx-default.conf
- nginx.conf
resources:
- django-config.yaml
- memcached.yaml
- wagtail.yaml
34 changes: 25 additions & 9 deletions k8s/iabweb/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,28 @@ metadata:
name: secrets-env
type: Opaque
stringData:
# Database connection details - to be overridden
IABWWW_DB_HOST: "host"
IABWWW_DB_NAME: "name"
IABWWW_DB_PASS: "pass"
IABWWW_DB_PORT: "port"
IABWWW_DB_USER: "user"

# Django secret key - to be overridden
IABWWW_DJANGO_SECRET_KEY: "secret"
IABWWW_ADMINS: |-
Robert Sparks <rjsparks@nostrum.com>
Kesara Rathnayake <kesara@staff.ietf.org>
IABWWW_ALLOWED_HOSTS: ".iab.org" # newline-separated list also allowed
WAGTAILADMIN_BASE_URL: "https://www.iab.org/admin/"

# Outgoing email details
IABWWW_EMAIL_HOST: "iab.mr.ietf.org"
IABWWW_EMAIL_PORT: "10027"

IABWWW_MATOMO_SITE_ID: null # must be present to enable Matomo

# Can also be a newline-separated list
IABWWW_CSRF_TRUSTED_ORIGINS: "https://www.iab.org"

# Database connection details - to be fetched from Vault
# IABWWW_DB_HOST: ""
# IABWWW_DB_NAME: ""
# IABWWW_DB_PASS: ""
# IABWWW_DB_PORT: ""
# IABWWW_DB_USER: ""

# Django secret key - to be fetched from Vault
# IABWWW_DJANGO_SECRET_KEY: ""
2 changes: 0 additions & 2 deletions k8s/iabweb/wagtail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ spec:
- name: "DEPLOY_UID"
value: "$DEPLOY_UID"
envFrom:
- configMapRef:
name: iabwww-django-config
- secretRef:
name: iabwww-secrets-env
securityContext:
Expand Down

0 comments on commit 773fcd3

Please sign in to comment.