Route53 weighted routing - #4843
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dominikhei The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @dominikhei. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
dcf85ce to
6fb1089
Compare
Issue
#4747
Description
This PR adds support for Route53's Weighted routing policy for ACM DNS validation records, controlled by two new flags:
--route53-validation-record-routing-policyselects the routing policy (simple or weighted). simple preserves existing behavior exactly.--route53-validation-record-weightthe weight assigned to this controller's validation records. Only used when policy is weighted. Must be a positive integer (weight 0 would cause Route53 to never return the record, preventing ACM from completing validation).When set to weighted, each controller creates its validation record using Route53's Weighted routing policy with
--cluster-nameas the SetIdentifier. This allows multiple controllers to each own a validation record for the same domain name without conflicting. Both flags are exposed as Helm values (route53ValidationRecordRoutingPolicy, route53ValidationRecordWeight) for users deploying via Helm.I tested all changes end-to-end by creating two kubernetes clusters in EKS, each running its own AWS Load Balancer Controller deployment with
--route53-validation-record-routing-policy=weightedand--cluster-nameset to the respective cluster name. Both controllers were pointed at the same Route53 hosted zone and each processed an Ingress with create-acm-cert: "true" for the same hostname, triggering ACM certificate requests and DNS validation record creation. The Route53 output confirmed that both controllers successfully created coexisting weighted records for the same validation name.With Simple routing policy this would fail, the second controller's ChangeResourceRecordSets call would be rejected because a record for that name already exists.
I additionally changed the following behavior:
The validation record create and delete paths now share a single buildValidationResourceRecordSet method to guarantee they stay in sync as Route53 requires a DELETE's ResourceRecordSet to exactly match what was originally created, including SetIdentifier and Weight for weighted records. I someone thinks this should not be the case, I am happy to roll this back :).
Checklist
README.md, or thedocsdirectory)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯