Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: only consider matching ingress class #50

Merged
merged 1 commit into from
Nov 25, 2023
Merged

fix: only consider matching ingress class #50

merged 1 commit into from
Nov 25, 2023

Conversation

bcaldwell
Copy link
Contributor

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
Copy link

codecov-commenter commented Oct 16, 2023

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 25.99%. Comparing base (95c265e) to head (382ab84).
Report is 40 commits behind head on master.

Files with missing lines Patch % Lines
pkg/controller/ingress-controller.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            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              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@VoyTechnology VoyTechnology left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not have permissions to approve this change but LGTM

@avakarev
Copy link

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

@STRRL
Copy link
Owner

STRRL commented Nov 25, 2023

Thanks! @bcaldwell

@STRRL STRRL merged commit 12fe1c8 into STRRL:master Nov 25, 2023
3 checks passed
@bcaldwell bcaldwell deleted the filter-ingress-class branch December 2, 2023 18:00
inductor pushed a commit to outductor/cloudflare-tunnel-ingress-controller that referenced this pull request Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants