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(GatewayAPI): only enqueue Gateway reconciliations from routes if parent is a Gateway #10316

Merged
merged 3 commits into from
May 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ func gatewaysForRoute(l logr.Logger) kube_handler.MapFunc {

var requests []kube_reconcile.Request
for _, parentRef := range route.Spec.ParentRefs {
// parentRef.Group & Kind won't be nil as they have a default value
if *parentRef.Group != gatewayapi.GroupName || *parentRef.Kind != "Gateway" {
continue
}

namespace := route.Namespace
if parentRef.Namespace != nil {
namespace = string(*parentRef.Namespace)
Expand Down Expand Up @@ -350,6 +355,11 @@ func (r *GatewayReconciler) SetupWithManager(mgr kube_ctrl.Manager) error {
var names []string

for _, parentRef := range route.Spec.ParentRefs {
// parentRef.Group & Kind won't be nil as they have a default value
if *parentRef.Group != gatewayapi.GroupName || *parentRef.Kind != "Gateway" {
continue
}

namespace := route.Namespace
if parentRef.Namespace != nil {
namespace = string(*parentRef.Namespace)
Expand Down
Loading