tarampampam / error-pages

🚧 Pretty server's error pages in the docker image & git repository (for traefik, k8s, nginx and so on)
https://tarampampam.github.io/error-pages/
MIT License
890 stars 82 forks source link

Add catch all #161

Closed chrisamti closed 1 year ago

chrisamti commented 1 year ago

Description

I need a "catch all paths" version of error-pages for my k8s project in order to show a custom error-page, while updating a nextcloud deployment to a higher version.

This is done by creating a temp maintenance deployment and service running error-pages pods. As soon as the maintenance pods are up and running, the ingress is being patched to this temp maintenance service. After the ingress has been patched to maintenance deployment, any path to the maintenance service should be answered with an error 494 page.

After the update is done the ingress is restored to the nextcloud service and the maintenance deployment and service will be deleted. Using a traefik middleware did not help in my case. So I decided to add the catch all mode.

I hope this simple addition is good enough to become a part of the error-pages project.

Fixes # (issue) Nothing

Checklist

codecov[bot] commented 1 year ago

Codecov Report

Merging #161 (691247b) into master (6a6809b) will decrease coverage by 0.56%. The diff coverage is 15.38%.

:exclamation: Current head 691247b differs from pull request most recent head c9f24c5. Consider uploading reports for the commit c9f24c5 to get more accurate results

@@            Coverage Diff             @@
##           master     #161      +/-   ##
==========================================
- Coverage   41.81%   41.25%   -0.57%     
==========================================
  Files          32       32              
  Lines        1325     1343      +18     
==========================================
  Hits          554      554              
- Misses        737      755      +18     
  Partials       34       34              
Impacted Files Coverage Δ
internal/cli/serve/command.go 0.00% <0.00%> (ø)
internal/cli/serve/flags.go 0.00% <0.00%> (ø)
internal/env/env.go 100.00% <ø> (ø)
internal/http/server.go 0.00% <0.00%> (ø)
internal/config/config.go 53.96% <100.00%> (ø)
internal/metrics/registry.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

rybnico commented 1 year ago

@chrisamti Why did you close this PR? Exactly this functionality is needed for an ingress-nginx default-backend on K8s.

chrisamti commented 1 year ago

Was never merged. But I could do a new PR.

rybnico commented 1 year ago

That would be great, I would like to offer to help you with the PR.

rybnico commented 1 year ago

@chrisamti If you don't have time to create a new PR, I can create one with your changes if that's okay with you.

chrisamti commented 1 year ago

That's ok with me