Skip to content

fix(cni-plugin): remove square brackets from host which may not be ipv6 in kubeconfig - #589

Merged
adleong merged 1 commit into
mainfrom
alex/square-free
Oct 28, 2025
Merged

adleong merged 1 commit into
mainfrom
alex/square-free

Conversation

@adleong

@adleong adleong commented Oct 28, 2025

Copy link
Copy Markdown
Contributor

When the install-cni script generates a kubeconfig for the cni-plugin, it wraps the kubernetes service host in square brackets. This is not valid if the host is an ipv4 address and, as of recent versions of Go, such hosts will fail to be parsed by the net/url package. See: golang/go@d6d2f7b

Remove the square brackets so that this host can be parsed properly.

@adleong
adleong requested a review from a team as a code owner October 28, 2025 00:31
@adleong
adleong merged commit e2cd04f into main Oct 28, 2025
13 checks passed
@adleong
adleong deleted the alex/square-free branch October 28, 2025 22:58
@rmannibucau

Copy link
Copy Markdown

Hi

shouldnt this fix test if there is ":" in the host and keep brackets if so? cause to fix ipv4 the fix breaks ipv6 case now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants