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

Switch external-dns back to official upstream #1762

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ytsarev
Copy link
Member

@ytsarev ytsarev commented Oct 26, 2024

Fixes #1744

This one needs extensive testing with various edge DNS environments.

The initial local test with rfc2136 is successful.

e2e regression tests

  • rfc2136
  • azure public dns
  • aws route53 (notice associated chart modifications)
  • cloudflare
HOW TO RUN CI ---

By default, all the checks will be run automatically. Furthermore, when changing website-related stuff, the preview will be generated by the netlify bot.

Heavy tests

Add the heavy-tests label on this PR if you want full-blown tests that include more than 2-cluster scenarios.

Debug tests

If the test suite is failing for you, you may want to try triggering Re-run all jobs (top right) with debug logging enabled. It will also make the print debug action more verbose.

@ytsarev ytsarev added the help wanted Extra attention is needed label Oct 26, 2024
@ytsarev ytsarev changed the title Switch extenral-dns back to official upstream Switch external-dns back to official upstream Oct 26, 2024
@ytsarev ytsarev force-pushed the external-dns-upstream branch from 49dc278 to 150c3f8 Compare October 26, 2024 22:49
Copy link
Collaborator

@abaguas abaguas left a comment

Choose a reason for hiding this comment

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

As commented on slack: https://cloud-native.slack.com/archives/C021P656HGB/p1730555833483909?thread_ts=1729982761.336259&cid=C021P656HGB

Version 0.15.0 can't create NS records. ThenewRecordSet function would need to be adapted: https://github.com/kubernetes-sigs/external-dns/blob/master/provider/azure/azure.go#L339

This is the error that we see:

time="2024-11-02T13:52:30Z" level=info msg="Updating NS record named 'cloud' to 'gslb-ns-eu-cloud.k8gb.io;gslb-ns-us-cloud.k8gb.io' for Azure DNS zone 'k8gb.io'."
time="2024-11-02T13:52:30Z" level=error msg="Failed to update NS record named 'cloud' to 'gslb-ns-eu-cloud.k8gb.io;gslb-ns-us-cloud.k8gb.io' for DNS zone 'k8gb.io': unsupported record type 'NS'"

# https://github.com/k8gb-io/external-dns
# https://github.com/k8gb-io/external-dns/pkgs/container/external-dns
image: ghcr.io/k8gb-io/external-dns:v0.13.4-azure-ns-multiarch
image: registry.k8s.io/external-dns/external-dns:v0.15.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
image: registry.k8s.io/external-dns/external-dns:v0.15.0
image: registry.k8s.io/external-dns/external-dns:v0.15.1

As discussed in slack and the community meeting, version 0.15.1 contains our upstream changes

@ytsarev ytsarev force-pushed the external-dns-upstream branch from 150c3f8 to f5994cb Compare January 18, 2025 23:18
@ytsarev
Copy link
Member Author

ytsarev commented Jan 22, 2025

Azure test is green with 0.15.1 . Tested it using an approach from #1773 , just using Crossplane instead of Terraform

k get gslb -A --context k3d-test-gslb1
NAMESPACE    NAME                        STRATEGY   GEOTAG
test-azure   failover-playground-istio   failover   eu
k get gslb -A --context k3d-test-gslb2
NAMESPACE    NAME                        STRATEGY   GEOTAG
test-azure   failover-playground-istio   failover   us
az network dns record-set a list --resource-group k8gb-test  --zone-name "$EDGE_DNS_ZONE" --output table
TTL    Fqdn                            Name              ProvisioningState    ResourceGroup
-----  ------------------------------  ----------------  -------------------  ---------------
5      gslb-ns-eu-cloud.k8gb-test.io.  gslb-ns-eu-cloud  Succeeded            k8gb-test
5      gslb-ns-us-cloud.k8gb-test.io.  gslb-ns-us-cloud  Succeeded            k8gb-test
az network dns record-set ns list --resource-group k8gb-test  --zone-name "$EDGE_DNS_ZONE" --output table
TTL     Fqdn                 Name    ProvisioningState    ResourceGroup
------  -------------------  ------  -------------------  ---------------
172800  k8gb-test.io.        @       Succeeded            k8gb-test
5       cloud.k8gb-test.io.  cloud   Succeeded            k8gb-test

Otherwise external-dns fails with to add records with

```
operation error Route 53: ListHostedZones, failed to resolve service endpoint, endpoint rule error, Invalid Configuration: Missing Region
```

Optimize env handling(avoid conditionals in templating)

Make externaldns log level configurable

Signed-off-by: Yury Tsarev <[email protected]>
@ytsarev ytsarev force-pushed the external-dns-upstream branch from f5994cb to 55ef42e Compare February 2, 2025 23:48
@ytsarev
Copy link
Member Author

ytsarev commented Feb 2, 2025

aws route53 is green. NOTE I have to slightly modify the chart templates for smoother operations, mainly setting default aws region to avoid zone list failure

aws route53 list-resource-record-sets --hosted-zone-id /hostedzone/Z1234 --output=yaml
ResourceRecordSets:
- Name: k8gb-test.io.
  ResourceRecords:
  - Value: ns-201.awsdns-25.com.
  - Value: ns-2014.awsdns-59.co.uk.
  - Value: ns-1087.awsdns-07.org.
  - Value: ns-771.awsdns-32.net.
  TTL: 172800
  Type: NS
- Name: k8gb-test.io.
  ResourceRecords:
  - Value: ns-201.awsdns-25.com. awsdns-hostmaster.amazon.com. 1 7200 900 1209600
      86400
  TTL: 900
  Type: SOA
- Name: cloud.k8gb-test.io.
  ResourceRecords:
  - Value: gslb-ns-eu-cloud.k8gb-test.io
  - Value: gslb-ns-us-cloud.k8gb-test.io
  TTL: 5
  Type: NS
- Name: gslb-ns-eu-cloud.k8gb-test.io.
  ResourceRecords:
  - Value: 172.21.0.6
  - Value: 172.21.0.7
  TTL: 5
  Type: A
- Name: gslb-ns-us-cloud.k8gb-test.io.
  ResourceRecords:
  - Value: 172.21.0.10
  - Value: 172.21.0.11
  TTL: 5
  Type: A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to upstream external-dns
2 participants