STRRL / cloudflare-tunnel-ingress-controller

🚀 Expose the website directly into the internet! The Kuberntes Ingress Controller based on Cloudflare Tunnel.
MIT License
644 stars 37 forks source link

fix: only consider matching ingress class #50

Closed bcaldwell closed 10 months ago

bcaldwell commented 11 months ago

Thank you for writing this project. I ran into an issue when running this project in my cluster with 2 ingresses (an existing ingress class for nginx, and this one):

❯ kubectl get ingressclass
NAME                CONTROLLER                                       PARAMETERS
nginx               k8s.io/ingress-nginx                             <none>       
cloudflare-tunnel   strrl.dev/cloudflare-tunnel-ingress-controller   <none> 

It seemed to consider the ingress configuration no matter which ingress class I had set on the ingress object, which meant it tried to configure all the ingresses including the ones nginx was managing. This PR prevents that by filtering the controlled ingress classes to the ones that match the set controller class name.

codecov-commenter commented 11 months ago

Codecov Report

Merging #50 (382ab84) into master (95c265e) will decrease coverage by 0.21%. The diff coverage is 0.00%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##           master      #50      +/-   ##
==========================================
- Coverage   26.20%   25.99%   -0.21%     
==========================================
  Files           9        9              
  Lines         622      627       +5     
==========================================
  Hits          163      163              
- Misses        449      454       +5     
  Partials       10       10              
Files Coverage Δ
pkg/controller/ingress-controller.go 0.00% <0.00%> (ø)
avakarev commented 10 months ago

@STRRL can you please check it out and release new version?

STRRL commented 10 months ago

Thanks! @bcaldwell