Skip to content

feat: log why a resource is ignored when no IngressClass selects it - #2847

Open
janiussyafiq wants to merge 2 commits into
apache:masterfrom
janiussyafiq:feat/log-ingressclass-skip
Open

feat: log why a resource is ignored when no IngressClass selects it#2847
janiussyafiq wants to merge 2 commits into
apache:masterfrom
janiussyafiq:feat/log-ingressclass-skip

Conversation

@janiussyafiq

Copy link
Copy Markdown
Contributor

Type of change:

  • New feature provided

What this PR does / why we need it:

A resource whose IngressClass does not select this controller is filtered out at the watch predicate, so it is dropped with no log, no event, and no status. Users cannot tell why their resource is never reconciled (see the ingressClassName part of #2756).

The shared predicate now logs why an object is ignored: at Info level when the resource is effectively orphaned (no spec.ingressClassName and no default IngressClass of this controller, or a referenced IngressClass that does not exist), and at V(1) when the IngressClass belongs to another controller, so multi-controller clusters are not spammed. Admission behavior is unchanged.

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

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.

1 participant