Skip to content
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 ipwrap to IPv6 ip address, and quote the address in url/endpoints settings #11909

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

geneliu
Copy link

@geneliu geneliu commented Jan 21, 2025

Add ipwrap to IPv6 ip address, and quote the address in some address-binding settings.

The enhancement is for ipv6 endpoint handling so that a wrap would be added if the address is IPv6 address. It does not change or impact IPv4 addresses.

e.g.:
fded:fade:face:acea::2ea will become to [fded:fade:face:acea::2ea] with this ipwrap filter added.

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test

/kind feature

/kind flake

What this PR does / why we need it:
In a pure IPv6 setup, the "ip" needs to be wrapped with square bracket to form a URL (address plus port or protocol://address:port)
E.g.: Without this filter, below setting will fail
etcd_peer_url: "https://ded:fade:face:acea::2ea:2380"
The correct setting is like this:
etcd_peer_url: "https://[ded:fade:face:acea::2ea]:2380"

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:
This added filter does not impact or change IPv4 addresses setup. But added enhancement to handle IPv6 address related URL, endpoints etc.

Does this PR introduce a user-facing change?:
None


…binding settings.

The enhancement is for ipv6 endpoint handling so that a wrap would be added if the address is IPv6 address.
It does not change or impact IPv4 addresses.

e.g.:
fded:fade:face:acea::2ea will become to [fded:fade:face:acea::2ea] with this ipwrap filter added.
@k8s-ci-robot
Copy link
Contributor

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Jan 21, 2025
Copy link

linux-foundation-easycla bot commented Jan 21, 2025

CLA Signed


The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jan 21, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: geneliu
Once this PR has been reviewed and has the lgtm label, please assign ant31 for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

Welcome @geneliu!

It looks like this is your first PR to kubernetes-sigs/kubespray 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kubespray has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 21, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @geneliu. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jan 21, 2025
@yankay
Copy link
Member

yankay commented Jan 22, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 22, 2025
@VannTen
Copy link
Contributor

VannTen commented Jan 22, 2025

Can you explain the benefits of those changes ?

@geneliu
Copy link
Author

geneliu commented Jan 22, 2025

This added filter will add square bracket on IPv6 addresses, do nothing on normal IPv4 addresses.
It's needed if the "ip" of the node is IPv6 address.

E.g.: with this filter the etcd_peer_url, client_url etc will be like https://[ipv6_address]: port
Without this filter the etcd deployment (for our case it's host mode installation) will fail because "https://ipv6_address:port" is not a valid URL.

Same scenarios apply to kube_api_server_endpoint.

Changes related to the extra double quote is because of some yaml settings caused error with IPv6 addresses directly because of multiple colons (":") in the setting. That confused ansible.

E.g.

bind-address: ded:fade:face:acea::2ea ## ansble failed
bind-address: "ded:fade:face:acea::2ea" ##working

@geneliu
Copy link
Author

geneliu commented Jan 22, 2025

BTW, this PR is part of our IPv6 only patch implementation.
IPv6 only means the cluster nodes have only IPv6 stack, no IPv4. So all addresses are IPv6.

As there is one existing PR to address the IPv6 only feature #11831 . I just hold on my changes for that.

@tico88612
Copy link
Member

Could you check if your CI has passed?
We won't merge your PR if you implement this feature but cannot pass the CI.

@tico88612
Copy link
Member

Ok, I see. #11831.
/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants