Skip to content

Commit

Permalink
chore: replace config map with external secret for ietfweb (#501)
Browse files Browse the repository at this point in the history
* chore: replace config map with external secret for ietfweb

* chore: remove admin emails and email hosts and ports from secrets
  • Loading branch information
microamp authored Aug 22, 2024
1 parent 4f5cdb1 commit b388f8b
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 27 deletions.
8 changes: 3 additions & 5 deletions k8s/iabweb/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ metadata:
name: secrets-env
type: Opaque
stringData:
IABWWW_ADMINS: |-
Robert Sparks <rjsparks@nostrum.com>
Kesara Rathnayake <kesara@staff.ietf.org>
IABWWW_ADMINS: null

IABWWW_ALLOWED_HOSTS: ".iab.org" # newline-separated list also allowed
WAGTAILADMIN_BASE_URL: "https://www.iab.org"

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

IABWWW_MATOMO_SITE_ID: null # must be present to enable Matomo

Expand Down
19 changes: 0 additions & 19 deletions k8s/ietfweb/django-config.yaml

This file was deleted.

1 change: 0 additions & 1 deletion k8s/ietfweb/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
29 changes: 29 additions & 0 deletions k8s/ietfweb/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: v1
kind: Secret
metadata:
name: secrets-env
type: Opaque
stringData:
IETFWWW_ADMINS: null

IETFWWW_ALLOWED_HOSTS: ".ietf.org" # newline-separated list also allowed
WAGTAILADMIN_BASE_URL: "https://www.ietf.org"

# Outgoing email details
IETFWWW_EMAIL_HOST: null
IETFWWW_EMAIL_PORT: null

IETFWWW_MATOMO_SITE_ID: null # must be present to enable Matomo

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

# Database connection details - to be fetched from Vault
# IETFWWW_DB_HOST: ""
# IETFWWW_DB_NAME: ""
# IETFWWW_DB_PASS: ""
# IETFWWW_DB_PORT: ""
# IETFWWW_DB_USER: ""

# Django secret key - to be fetched from Vault
# IETFWWW_DJANGO_SECRET_KEY: ""
4 changes: 2 additions & 2 deletions k8s/ietfweb/wagtail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ spec:
- name: "DEPLOY_UID"
value: "$DEPLOY_UID"
envFrom:
- configMapRef:
name: django-config
- secretRef:
name: ietfwww-secrets-env
securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down

0 comments on commit b388f8b

Please sign in to comment.