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:
- Move to v2 of AWS SDK
- Add a new
sigs.k8s.io/external-dns/provider/blueprint for zone caching
- 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):
- Add logget (logr.Logger) to the AWSProvider struct
- Add
ctx to the constructor to init the logger with it.
- Replace the old logger
Logic:
- The AWS Config got enlarged. Ensure our config will work
- 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.
- In the Route53API interface, this got changed
- The
SupportedREcordType() changed to route53types.RTYpe (used to be a string). Should not matter tho
- 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.
- We seem to have a "retry" part of
submitChanges commented out. We might need to do the same in borrowed code.
Why
The
external-dnsmoved fromv1tov2of 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:
sigs.k8s.io/external-dns/provider/blueprintfor zone cachingsigs.k8s.io/external-dns/provider,sigs.k8s.io/external-dns/endpoint,sigs.k8s.io/external-dns/planandsigs.k8s.io/external-dns/internal/idna. This is needed for at leastSoftErrortypeLogging (those are our changes):
ctxto the constructor to init the logger with it.Logic:
external-dnsmoved 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.SupportedREcordType()changed toroute53types.RTYpe(used to be a string). Should not matter thosubmitChangescommented out. We might need to do the same in borrowed code.