Skip to content

Fatal error when DNSEndpoint target is invalid #5809

@vflaux

Description

@vflaux

What happened:

  1. External-dns exit when a DNSEndpoint when an invalid target is provided.
  2. It also exits with a DNSRecord of type AAAA and a hostname target and the AWS provider specific "alias" key.

What you expected to happen:

  1. should log an error, not exit with a fatal log
  2. DNRecord of types AAAA with a hostname target and the provider specific alias should be valid.

How to reproduce it (as minimally and precisely as possible):
args:

--source=crd

manifest:

apiVersion: externaldns.k8s.io/v1alpha1
kind: DNSEndpoint
metadata:
  name: alias
  namespace: default
spec:
  endpoints:
  - dnsName: alias.example.com
    recordType: AAAA
    targets:
    - target.example.com
    providerSpecific:
    - name: "alias"
      value: "true"

log:

{"level":"fatal","msg":"Failed to do run once: ParseAddr(\"target.example.com\"): unexpected character (at \"target.example.com\")","time":"xxx"}

Anything else we need to know?:

ip, err := netip.ParseAddr(target)

Environment:

  • External-DNS version (use external-dns --version): v0.19.0
  • DNS provider: AWS
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions