-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix(cloudflare): improve SRV record handling #5569
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
base: master
Are you sure you want to change the base?
fix(cloudflare): improve SRV record handling #5569
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @mrshaun13. 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. |
- Parse SRV record content into structured Data map - Clear Content field when Data is set for SRV records - Handle Data field in mock client for SRV records - Fix test cases and remove parallel test execution - Add test coverage for SRV records
83042e7
to
89fe195
Compare
Hi. Could you share results of a smoke tests agains a cluster and CF provder? /ok-to-test |
parts := strings.Fields(recordData.Content) | ||
if len(parts) >= 4 { | ||
priority, _ := strconv.Atoi(parts[0]) | ||
weight, _ := strconv.Atoi(parts[1]) | ||
port, _ := strconv.Atoi(parts[2]) | ||
target := strings.Join(parts[3:], " ") | ||
recordData.Data = map[string]interface{}{ | ||
"priority": priority, | ||
"weight": weight, | ||
"port": port, | ||
"target": target, | ||
} | ||
recordData.Content = "" | ||
} |
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.
Wdyt about moving this part into a dedicated func ?
That would ease maintenance and readability.
PR needs rebase. 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. |
@mrshaun13 Do you think you can rebase this PR and takes first review comments into account ? |
What does it do ?
Fixes SRV record handling in the Cloudflare provider by:
Fixes #4751
Motivation
The current implementation has issues with SRV record handling in the Cloudflare provider, particularly around record identification and data field management. This PR addresses these issues to ensure reliable SRV record management.
More
Testing
Test output: