Support the new banner feature in Noggin

See: https://github.com/fedora-infra/noggin/pull/701

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
Aurélien Bompard 2021-07-21 10:15:55 +02:00
parent 8d887b9387
commit 6490c755b2
No known key found for this signature in database
GPG key ID: 31584CFEB9BF64AD
5 changed files with 21 additions and 0 deletions

View file

@ -15,6 +15,17 @@ items:
{{ load_file('noggin.cfg.py') | indent(6) }}
gunicorn.conf.py: |-
{{ load_file('gunicorn.conf.py') | indent(6) }}
- apiVersion: v1
kind: ConfigMap
metadata:
name: noggin-templates
labels:
app: {{ app }}
data:
after-navbar.html: |-
{{ load_file('after-navbar.html') | indent(6) }}
head.html: |-
{{ load_file('head.html') | indent(6) }}
- apiVersion: v1
kind: ConfigMap
metadata:

View file

@ -38,6 +38,9 @@ spec:
- name: noggin-config-volume
mountPath: "/etc/noggin"
readOnly: true
- name: noggin-templates-volume
mountPath: "/etc/noggin-templates"
readOnly: true
- name: noggin-secrets-volume
mountPath: "/etc/noggin-secrets"
readOnly: true
@ -91,6 +94,9 @@ spec:
- name: noggin-config-volume
configMap:
name: noggin-config
- name: noggin-templates-volume
configMap:
name: noggin-templates
- name: noggin-secrets-volume
secret:
secretName: noggin-secrets

View file

@ -45,6 +45,10 @@ MAIL_DOMAIN_BLOCKLIST = [
"centosproject.org",
]
# Banners
TEMPLATES_CUSTOM_DIRECTORIES = ["/etc/noggin-templates"]
ACCEPT_IMAGES_FROM = ["pagure.io"]
# Those file should be mounted from OpenShift secrets
FREEIPA_ADMIN_PASSWORD = from_file('/etc/noggin-secrets/ipa-admin')
FERNET_SECRET = from_file('/etc/noggin-secrets/fernet').encode('utf-8')