Skip to content

Update AWS provider from external-dns #742

@maksymvavilov

Description

@maksymvavilov

Why

The external-dns moved from v1 to v2 of the SDK. We did not change much. The approach here is to copy what they have and add our stuff to make it work.

How

Copy what they have and change the following:

Dependencies:

  1. Move to v2 of AWS SDK
  2. Add a new sigs.k8s.io/external-dns/provider/blueprint for zone caching
  3. Update to a fresher versions of: sigs.k8s.io/external-dns/provider, sigs.k8s.io/external-dns/endpoint, sigs.k8s.io/external-dns/plan and sigs.k8s.io/external-dns/internal/idna. This is needed for at least SoftError type

Logging (those are our changes):

  1. Add logget (logr.Logger) to the AWSProvider struct
  2. Add ctx to the constructor to init the logger with it.
  3. Replace the old logger

Logic:

  1. The AWS Config got enlarged. Ensure our config will work
  2. The external-dns moved to multiple clients created from v2 config. We use a single client. Either wrap our client in a map (if it will work), or adapt the V2 config.
  3. In the Route53API interface, this got changed
  4. The SupportedREcordType() changed to route53types.RTYpe (used to be a string). Should not matter tho
  5. Just like the function above, we export a few types (Route53Change, Route53Changes, AWSConfig, Route53API). We seem not to use them anywhere else, but we will need to double-check.
  6. We seem to have a "retry" part of submitChanges commented out. We might need to do the same in borrowed code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions