Skip to content

Conversation

@ronething
Copy link
Contributor

@ronething ronething commented Jul 3, 2025

Type of change:

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches
  • Documentation
  • Refactor
  • Chore
  • CI/CD or Tests

What this PR does / why we need it:

In ApisixRouteController, it is necessary to watch the ingressClass to modify the changes in annotaions.

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

@ronething ronething changed the title fix: ApisixRoute controller watch annotation change fix: add more event filter across controllers Jul 3, 2025
Signed-off-by: ashing <[email protected]>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR extends event filtering in various controllers to trigger reconciliations on both annotation changes and Secret updates.

  • Adds predicate.AnnotationChangedPredicate{} to several controllers
  • Introduces a Secret-type filter predicate.NewPredicateFuncs(...) across controllers
  • Imports the predicate package in the gatewayproxy controller

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/controller/ingressclass_controller.go Added annotation-change filter
internal/controller/ingress_controller.go Added Secret update filter
internal/controller/gatewayproxy_controller.go Imported predicate package and added Secret filter
internal/controller/apisixtls_controller.go Added Secret update filter
internal/controller/apisixroute_controller.go Added annotation-change filter and reformatted Watch
internal/controller/apisixconsumer_controller.go Added Secret update filter
Comments suppressed due to low confidence (1)

internal/controller/ingress_controller.go:78

  • New event filtering logic for Secret updates has been introduced here; consider adding or updating unit/integration tests to ensure that Secret create/update/delete events correctly trigger reconciliation.
				predicate.NewPredicateFuncs(func(obj client.Object) bool {

Signed-off-by: ashing <[email protected]>
@ronething ronething merged commit 8381113 into apache:master Jul 4, 2025
27 of 28 checks passed
@ronething ronething deleted the fix/default_annotation branch July 4, 2025 06:09
AlinsRan pushed a commit that referenced this pull request Jul 7, 2025
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.

3 participants