-
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
feat(digitalocean): add mx and txt records support #4690
feat(digitalocean): add mx and txt records support #4690
Conversation
Welcome @simonoff! |
Hi @simonoff. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions 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. |
docs/tutorials/txt-record.md
Outdated
You can create and manage TXT records with the help of [CRD source](../contributing/crd-source.md) | ||
and `DNSEndpoint` CRD. Currently, this feature is only supported by `digital_ocean` providers. | ||
|
||
In order to start managing MX records you need to set the `--managed-record-types TXT` flag. |
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.
In order to start managing MX records you need to set the `--managed-record-types TXT` flag. | |
In order to start managing MX records you need to set the `--managed-record-types MX` flag. |
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.
Thank you! Forgot to change there.
priority, domain, err := parseMxTarget(data) | ||
if err == nil { | ||
request.Priority = int(priority) | ||
request.Data = provider.EnsureTrailingDot(domain) | ||
} |
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.
When error != nil
, it should be (at least) displayed to the user and/or sent to the calling method.
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.
Basically after will be a raise from DO client. But I can add a logging.
} | ||
|
||
if c.Options.Type == endpoint.RecordTypeMX { | ||
logFields["priotity"] = c.Options.Priority |
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.
logFields["priotity"] = c.Options.Priority | |
logFields["priority"] = c.Options.Priority |
Since the typo was not detected by the test |
Such type is for logs. Not for a exact functionality. |
/ok-to-test |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: szuecs 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 |
log.WithFields(log.Fields{ | ||
"domain": domain, | ||
"dnsName": name, | ||
"recordType": recordType, | ||
"data": data, | ||
}).Warn("Unable to parse MX target") |
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.
we just log the error? what happens with the request
that gets returned?
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.
It will incomplete and DO will return error after trying to create such record. As any error if you put a broken data in values to DO.
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.
Gotcha. There is a merge conflict now, if you get that fixed, I'm happy to approve.
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.
fixed.
e22b905
to
9c35ee2
Compare
9c35ee2
to
ebc1052
Compare
@mloiseleur Hi! What do you think about merging this staff? |
/retitle feat(digitalocean): add mx and txt records support |
/lgtm |
@mloiseleur thank you! |
Description
Add support for MX and TXT records creation for DigitalOcean provider via CRD Source.
Checklist