The source code and default configuration of the Building Block is available in our GitLab.
Add the directory
syseleven-ingress-nginx to your control repository. Add a
.gitlab-ci.yml to the directory with the following content:
include: - project: syseleven/building-blocks/helmfiles/ingress-nginx file: JobDevelopment.yaml ref: 5.5.1 - project: syseleven/building-blocks/helmfiles/ingress-nginx file: JobStaging.yaml ref: 5.5.1 - project: syseleven/building-blocks/helmfiles/ingress-nginx file: JobProduction.yaml ref: 5.5.1
Remove environments you are not using by removing their include.
No configuration is required.
The Building Block delivers a custom default backend. This default backend is used for all URLs the ingress-controller does not understand (i.e., all the requests that are not mapped with an Ingress) or for requests that got a 502, 503 or 504 from the upstream backend server. This default backend delivers configurable static pages while still maintaining the original error code.
You can customize the default backend by overriding
values-ingress-nginx-extension.yaml. See the values.yaml for the default maintenance page.
Here is an example on how to configure different error pages for different error codes.
maintenancePages: 404.html: |- <!DOCTYPE html> <html> <head> <title>Error</title> </head> <body> ... </body> </html> 418.html: |- ... 429.html: |- ... 500.html: |- ... 502.html: |- ... 503.html: |- ... 523.html: |- ...