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

bug: updating DNSPolicy triggers an error updating dnsrecord #955

Closed
maleck13 opened this issue Oct 24, 2024 · 2 comments
Closed

bug: updating DNSPolicy triggers an error updating dnsrecord #955

maleck13 opened this issue Oct 24, 2024 · 2 comments

Comments

@maleck13
Copy link
Collaborator

maleck13 commented Oct 24, 2024

What

using a DNSPolicy such as

apiVersion: kuadrant.io/v1alpha1
kind: DNSPolicy
metadata:
  name: external-dnspolicy
spec:
  loadBalancing:
    weight: 122
    geo: EU
    defaultGeo: true
  targetRef:
    group: gateway.networking.k8s.io
    kind: Gateway
    name: external
  providerRefs:
    - name: aws-credentials
  healthCheck:
    path: /health
    port: 443
    protocol: HTTPS
    interval: 30s
    failureThreshold: 3

It creates fine and the expected DNSRecord is set up.

Updating any of the fields in the DNSPolicy (example the weight) causes the following error

kuadrant-operator-controller-manager-865b5c8d96-8xqdb manager {"level":"info","ts":"2024-10-24T10:59:13Z","logger":"kuadrant-operator.event logger","msg":"new event","type":"update","kind":"DNSPolicy","namespace":"test","name":"external-dnspolicy"}
kuadrant-operator-controller-manager-865b5c8d96-8xqdb manager {"level":"error","ts":"2024-10-24T10:59:13Z","logger":"kuadrant-operator.EffectiveDNSPoliciesReconciler","msg":"unable to update dns record","policy":"dnspolicy.kuadrant.io:test/external-dnspolicy","listener":"gateway.gateway.networking.k8s.io:test/external#http","record":"dnsrecord.kuadrant.io:test/external-http","stacktrace":"github.com/kuadrant/kuadrant-operator/controllers.(*EffectiveDNSPoliciesReconciler).reconcile\n\t/workspace/controllers/effective_dnspolicies_reconciler.go:172\ngithub.com/kuadrant/policy-machinery/controller.Subscription.Reconcile\n\t/go/pkg/mod/github.com/kuadrant/[email protected]/controller/subscriber.go:34\ngithub.com/kuadrant/policy-machinery/controller.(*Workflow).Run.func1\n\t/go/pkg/mod/github.com/kuadrant/[email protected]/controller/workflow.go:42\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\t/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78"}

additionally there is no indication of a problem on DNSPolicy:

status:
    conditions:
    - lastTransitionTime: "2024-10-24T10:56:34Z"
      message: DNSPolicy has been accepted
      reason: Accepted
      status: "True"
      type: Accepted
    - lastTransitionTime: "2024-10-24T10:56:39Z"
      message: DNSPolicy has been successfully enforced
      reason: Enforced
      status: "True"
      type: Enforced
    observedGeneration: 2
    totalRecords: 1
@maleck13
Copy link
Collaborator Author

maleck13 commented Oct 24, 2024

@mikenairn @guicassolato seeing this with DNSPolicy with state of the world

Also notice the status is still set as enforced and accepted

This is reproducable without DNS operator running also (just wanted to rule some odd interaction out)

@mikenairn
Copy link
Member

Closing this, it was an issue in a PR that wasn't merge yet. It has been updated now and should function as expected.

#937

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants