feat(nginx): 增加默认404 503页面

这个提交包含在:
2024-08-21 10:19:41 +08:00 未验证
父节点 87793b89ac
当前提交 b5173fc143
修改 2 个文件,包含 262 行新增0 行删除
+18
查看文件
@@ -30,6 +30,8 @@ spec:
config:
use-forwarded-headers: "true"
allow-snippet-annotations: "true"
# 自定义错误页面
custom-http-errors: "404,503"
# 缓存配置
http-snippet: |
proxy_cache_path /tmp/nginx-cache levels=1:2 keys_zone=cache:2m max_size=100m inactive=7d use_temp_path=off;
@@ -114,3 +116,19 @@ spec:
- name: crowdsec-bouncer-plugin
mountPath: /etc/nginx/lua/plugins/crowdsec
subPath: crowdsec
defaultBackend:
enabled: true
image:
registry: registry.k8s.io
image: ingress-nginx/custom-error-pages
tag: v1.0.1
extraVolumes:
- name: custom-html
configMap:
name: custom-html
extraVolumeMounts:
- name: custom-html
mountPath: /www
# 和controller部署同一节点
nodeSelector:
svccontroller.k3s.cattle.io/enablelb: "true"