-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce "ModifyEndpoints" in extended EndpointModifyingProvider int…
…erface This avoids that providers can only modify endpoints in their ApplyChanges method, possibly leading to no-op upsert operations because external-dns can't foresee these automatic changes. The prime example for this is automatic conversion of CNAME records to alias records in the Route 53 provider if their target is an ELB/ALB. When retrieving these records from the zone, the provider adds the provider-specific properties for "alias" and "evaluate-target-health" but when extracting the corresponding endpoints from the cluster state, external-dns will not know that the provider will set these attributes automatically and will therefor issue a (no-op) update operation. This change calls a "ModifyEndpoints" method in the provider to let it do these automatic modifications before external-dns calculates the change plan, allowing it do skip the no-op update. As a consequence, the Route 53 provider can move the automatic CNAME to alias conversion in this method (where it only needs to the add the correct provider-specific properties) and in ApplyChanges only needs to act upon these. This also gets rid of the special-case handling of evaluate-target-health in the plan calculation.
- Loading branch information
1 parent
7b29cdb
commit 4d36e99
Showing
2 changed files
with
6 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters