-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Add IPv6 support to the Downward e2e API test #75237
Conversation
Current regex used in the Downward e2e API tests is matching only IPv4 addresses, consequently those tests fails with IPv6 clusters. This patch modifies the regex to match ipv4 and ipv6 addresses. Ref: kubernetes#70248
@aojea: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. 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/test-infra repository. |
Hi @aojea. Thanks for your PR. I'm waiting for a kubernetes 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/test-infra repository. |
/sig node |
/assign @MrHohn |
@MrHohn: GitHub didn't allow me to assign the following users: leblancd, rpothier. Note that only kubernetes members and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time. In response to this:
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/test-infra repository. |
test/e2e/common/downward_api.go
Outdated
@@ -78,7 +78,7 @@ var _ = Describe("[sig-node] Downward API", func() { | |||
expectations := []string{ | |||
fmt.Sprintf("POD_NAME=%v", podName), | |||
fmt.Sprintf("POD_NAMESPACE=%v", f.Namespace.Name), | |||
"POD_IP=(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)", | |||
"POD_IP=(?:\\d+\\.\\d+\\.\\d+\\.\\d+|[a-fA-F0-9:]+)", |
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 pattern seems a little loose because it matches "TEST" also which is not IP address.
We might want to have more strict pattern as a test.
BTW, I guess we will re-use this pattern for IPv6 support in near future. If so, it is nice to have this pattern in test/e2e/framework
.
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.
@oomichi I added a new regex and made it available as a constant in the framework pkg.
I couldn´t find a simpler regex, that wasn´t too loose or that covered all the IPv6 addresses
Previous IPv6 regex was too loose, this patchs adds a better and more strict regex for IPv6 addresses and makes the IPv4 and IPv6 regex availables as constants inside the framework pkg
/assign @Random-Liu |
/release-note-none |
I confirmed several patterns of IPv6 (full form, drop leading zeroes, localhost, etc) can be validated with this code. Thanks for doing this. /lgtm |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aojea, MrHohn 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 |
Ref: #70248
What type of PR is this?
/kind failing-test
What this PR does / why we need it:
Current regex used in the Downward e2e API tests is matching only IPv4 addresses, consequently, those tests fail with IPv6 clusters.
This patch modifies the regex to match ipv4 and ipv6 addresses.
Which issue(s) this PR fixes:
Fixes partially #70248
Special notes for your reviewer:
Does this PR introduce a user-facing change?: