-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow to associate aws dns records with health checks #1288
allow to associate aws dns records with health checks #1288
Conversation
requesting feedback from @njuettner |
gentle reminder @njuettner |
I just tested this PR in my environment, and it worked fine, using the following annotation:
|
kind reminder @njuettner |
Requesting review from @linki @njuettner |
provider/aws.go
Outdated
@@ -317,6 +318,10 @@ func (p *AWSProvider) records(zones map[string]*route53.HostedZone) ([]*endpoint | |||
default: | |||
// one of the above needs to be set, otherwise SetIdentifier doesn't make sense | |||
} | |||
|
|||
if r.HealthCheckId != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't depend on a SetIdentifier
being set. Can you move that one level out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, @rajatjindal can you move it out of if r.SetIdentifier != nil ...
? this shouldn't be in the clause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it. I will make this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still testing it, in the meantime, can u confirm if we should check for aliasrecord? as this option is available only if we set aliasrecord to true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requesting feedback from @devkid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean, a health check works with any target, not only alias records.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @rajatjindal code is correct. Associating a custom health check to a record set in Route53 is only available to records with routing policies other than 'Simple'. Therefore, HealthCheckId
should only be considered when SetIdentifier
is also set. @njuettner could you please confirm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment from @devkid and me, PTAL. Other than that LGTM 👍
@njuettner is there a plan to merge this? |
4aa3c4f
to
dc8a0a1
Compare
sorry for picking up this so late again. I saw the inconsistency on health-check inside setIdentifier condition, and other outside that condition. thanks for pointing that out. I think adding the health check annotation only works when the routing policy != "Simple", and also that would mean that setIdentifier should be set. could you please confirm what u think about it. many thanks |
Is there any plan to merge this? I am looking for this feature... |
/kind feature |
@rajatjindal to answer your question, from looking at the docs, healthcheckid seems not related if you set the identifier or not. https://docs.aws.amazon.com/Route53/latest/APIReference/API_ResourceRecordSet.html#Route53-Type-ResourceRecordSet-HealthCheckId But it would make sense to check what ResourceRecordSet we have 'Alias' or 'Non-Alias' and checking if you have more than two or more resource record sets to respond to a DNS query. And if I got this right you also need to have a health check in place which you have to create before right? Otherwise it wouldn't make sense to reference the id of the health check. I think this needs to be added for our docs otherwise people don't know what external-dns is doing and what not. |
@rajatjindal can you add some end user documentation that describes how this feature works? Also I think it would be good to rebase this because the newer GitHub actions CI checks have not run. Thanks! |
sorry for replying late, was busy with some other work. i will be looking at this PR today |
Long story short - when this will be landed? |
@rajatjindal do you have time to add some end user documentation for this PR? @volk1234 we are just waiting for the PR to be rebased and to get some documentation added, then we will work to get the official maintainers to review and hopefully merge this shortly after that. |
21752a8
to
a3dc3e8
Compare
apologies for delayed responses. i was dealing with some personal stuff. I will try to keep my replies current until this is merged. |
Is this ready to be reviewed @rajatjindal ? If so, it looks like next step is to /assign @njuettner? We have a custom fork using this functionality and would love to come back to using the standard charts. |
yes, this is ready for review. Happy to address if there are more review comments. |
/assign @njuettner We've been running this in production for months now, works great. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Raffo, rajatjindal The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR allows to associate the DNS records with health checks. This helps in auto fail over in case one of the record is having issues.