From ea1a0a2eb54398da1e35f6ba5f16fe6a794c138d Mon Sep 17 00:00:00 2001 From: Simen Kirkvik Date: Thu, 8 Jan 2026 14:25:22 +0100 Subject: [PATCH] Add custom 404.html to nginx default backend --- .../manifests/custom-error-pages.cm.yaml | 8 ++++++++ .../values/ingress-nginx.yaml.gotmpl | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 values/ingress-nginx/manifests/custom-error-pages.cm.yaml diff --git a/values/ingress-nginx/manifests/custom-error-pages.cm.yaml b/values/ingress-nginx/manifests/custom-error-pages.cm.yaml new file mode 100644 index 00000000..5f601792 --- /dev/null +++ b/values/ingress-nginx/manifests/custom-error-pages.cm.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: custom-error-pages + namespace: ingress-nginx +data: + "404": | + Oceanbox is having a woopsie dupsie. uwu diff --git a/values/ingress-nginx/values/ingress-nginx.yaml.gotmpl b/values/ingress-nginx/values/ingress-nginx.yaml.gotmpl index 00bb1dda..b72f4f64 100644 --- a/values/ingress-nginx/values/ingress-nginx.yaml.gotmpl +++ b/values/ingress-nginx/values/ingress-nginx.yaml.gotmpl @@ -132,3 +132,21 @@ defaultBackend: operator: Exists effect: NoSchedule + ## Additional volumeMounts to the default backend container. + # - name: copy-portal-skins + # mountPath: /var/lib/lemonldap-ng/portal/skins + extraVolumeMounts: + - name: custom-error-pages + mountPath: /www + + ## Additional volumes to the default backend pod. + # - name: copy-portal-skins + # emptyDir: {} + extraVolumes: + - name: custom-error-pages + configMap: + name: custom-error-pages + items: + - key: "404" + path: "404.html" +