Add custom 404.html to nginx default backend

This commit is contained in:
2026-01-08 14:25:22 +01:00
parent ffb572e762
commit ea1a0a2eb5
2 changed files with 26 additions and 0 deletions
@@ -0,0 +1,8 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: custom-error-pages
namespace: ingress-nginx
data:
"404": |
<span>Oceanbox is having a woopsie dupsie. uwu</span>
@@ -132,3 +132,21 @@ defaultBackend:
operator: Exists operator: Exists
effect: NoSchedule 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"