-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add custom error pages example file (#8060)
* Add custom error pages example file * Update docs/examples/customization/custom-errors/README.md Co-authored-by: Jintao Zhang <tao12345666333@163.com> Co-authored-by: Jintao Zhang <tao12345666333@163.com>
- Loading branch information
1 parent
d8c9a6c
commit a9495ec
Showing
4 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
docs/examples/customization/custom-errors/custom-default-backend-error_pages.configMap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Custom error page configMap | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: custom_error_pages | ||
data: | ||
404: | | ||
<!DOCTYPE html> | ||
<html> | ||
<head><title>PAGE NOT FOUND</title></head> | ||
<body>PAGE NOT FOUND</body> | ||
</html> | ||
503: | | ||
<!DOCTYPE html> | ||
<html> | ||
<head><title>CUSTOM SERVICE UNAVAILABLE</title></head> | ||
<body>CUSTOM SERVICE UNAVAILABLE</body> | ||
</html> |
20 changes: 20 additions & 0 deletions
20
docs/examples/customization/custom-errors/custom-default-backend.helm.values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
controller: | ||
custom-http-errors: "404,503" | ||
defaultBackend: | ||
enabled: true | ||
image: | ||
registry: k8s.gcr.io | ||
image: ingress-nginx/nginx-errors | ||
tag: "0.48.1" | ||
extraVolumes: | ||
- name: custom_error_pages | ||
configMap: | ||
name: custom_error_pages | ||
items: | ||
- key: "404" | ||
path: "404.html" | ||
- key: "503" | ||
path: "503.html" | ||
extraVolumeMounts: | ||
- name: custom_error_pages | ||
mountPath: /www |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters