Skip to content

Don't reconcile delete events for GatewayClasses that do not reference NGF #1476

Closed
@kate-osborn

Description

@kate-osborn

Describe the bug
NGF ignores create and update events for GatewayClasses that have a controller name that doesn't match NGF. However, NGF reconciles delete events for these GatewayClasses.

To Reproduce
Steps to reproduce the behavior:

  1. Create a GatewayClass with a controller name that does not match NGF's controller name
  2. Delete this GatewayClass
  3. View logs on NGF pod and search for "Reconciling" and "GatewayClass" and you will see a log for the delete event.
{"level":"info","ts":"2024-01-17T16:46:22Z","msg":"Reconciling the resource","controller":"gatewayclass","controllerGroup":"gateway.networking.k8s.io","controllerKind":"GatewayClass","GatewayClass":{"name":"not-nginx"},"namespace":"","name":"not-nginx","reconcileID":"60f42506-e703-44ec-81da-60d932e93788"}
{"level":"info","ts":"2024-01-17T16:46:22Z","msg":"Deleted the resource","controller":"gatewayclass","controllerGroup":"gateway.networking.k8s.io","controllerKind":"GatewayClass","GatewayClass":{"name":"not-nginx"},"namespace":"","name":"not-nginx","reconcileID":"60f42506-e703-44ec-81da-60d932e93788"}
{"level":"info","ts":"2024-01-17T16:46:22Z","logger":"eventLoop","msg":"added an event to the next batch","type":"*events.DeleteEvent","total":1}
{"level":"info","ts":"2024-01-17T16:46:22Z","logger":"eventLoop.eventHandler","msg":"Handling events from the batch","batchID":5,"total":1}
{"level":"info","ts":"2024-01-17T16:46:22Z","logger":"eventLoop.eventHandler","msg":"Handling events didn't result into NGINX configuration changes","batchID":5}
{"level":"info","ts":"2024-01-17T16:46:22Z","logger":"eventLoop.eventHandler","msg":"Finished handling the batch","batchID":5}

Expected behavior
NGF should ignore delete events for GatewayClasses with a controller name that does not match NGF.

Your environment

  • Version of the NGINX Gateway Fabric - edge (b2d078b)
  • Version of Kubernetes 1.27
  • Kubernetes platform (e.g. Mini-kube or GCP): Kind

Additional context
Add any other context about the problem here. Any log files you want to share.

Metadata

Metadata

Assignees

Labels

area/performancePerformance relatedbacklogCurrently unprioritized work. May change with user feedback or as the product progresses.good first issueGood for newcomerstech-debtShort-term pain, long-term benefit

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions