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

Gateway HTTPRoutes entries are deleted when a specific kind is allowed on Gateway #3068

Closed
gmagniez opened this issue Oct 6, 2022 · 1 comment · Fixed by #3271
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@gmagniez
Copy link

gmagniez commented Oct 6, 2022

What happened:
external-dns is deleting entries of existing Gateway API HTTPRoutes when handling an event with a new added route.
What you expected to happen:
external-dns adding a new entry for the new route and keeping existing ones

How to reproduce it (as minimally and precisely as possible):
Create a Gateway with an "allowedRoutes" filter of type kind: HTTPRoute

allowedRoutes:
      kinds:
      - kind: HTTPRoute
      namespaces:
        from: All

Anything else we need to know?:
After addind some debug logs and rebuild external-dns, it seems that the APIGroup and Kind fields of the handled HTTPRoute objects are present at external-dns startup but no more after while handling events. The problem is located here:
https://github.com/kubernetes-sigs/external-dns/blob/master/source/gateway.go#L442
But I did not find an explanation why gvk.Group and gvk.Kind are empty strings once a while.

I have added the following log line juste before the Kind check:
log.Debugf("Check for kind match for route %s/%s, gw kind: %s/%s rt kind: %s/%s", meta.Namespace, meta.Name, group, gk.Kind, gvk.Group, gvk.Kind)

At startup I see:
level=debug msg="Check for kind match for route nsA/routeA, gw kind: gateway.networking.k8s.io/HTTPRoute rt kind: gateway.networking.k8s.io/HTTPRoute"

After handling a new route:
"Check for kind match for route nsA/routeA, gw kind: gateway.networking.k8s.io/HTTPRoute rt kind: /"

Environment:

  • External-DNS version (use external-dns --version): 0.12.2
  • DNS provider: google
  • Others: Using external-dns with gateway api v1beta1
@gmagniez gmagniez added the kind/bug Categorizes issue or PR as related to a bug. label Oct 6, 2022
@abursavich
Copy link
Contributor

@gmagniez, thanks for the detailed issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants