Skip to content

Add ipv6 support.#381

Merged
k8s-ci-robot merged 1 commit intokubernetes-client:masterfrom
brendandburns:fix
Dec 22, 2019
Merged

Add ipv6 support.#381
k8s-ci-robot merged 1 commit intokubernetes-client:masterfrom
brendandburns:fix

Conversation

@brendandburns
Copy link
Contributor

@brendandburns brendandburns requested a review from drubin December 21, 2019 05:44
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 21, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 21, 2019
Copy link
Contributor

@drubin drubin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests don't seem to pass so not going to approve. But in general besides the improvements the code looks good.

src/config.ts Outdated

// Wrap raw IPv6 addresses in brackets.
let serverHost = host;
if (host && host.indexOf(':') != -1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are methods to check if its an ipv6 Adress.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

name: clusterName,
caFile: `${pathPrefix}${Config.SERVICEACCOUNT_CA_PATH}`,
server: `${scheme}://${host}:${port}`,
server: `${scheme}://${serverHost}:${port}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should also be building up the address with Uri helpers? Maybe they can also handle this natively?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't tell from docs if they handled this or not, so I left it as is.

if (!cluster) {
return;
}
expect(cluster.server).to.equal('http://[::1234:5678]:80');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding a test!

@brendandburns
Copy link
Contributor Author

Comments addressed, style fixed, please take another look.

Thanks!

Copy link
Contributor

@drubin drubin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 22, 2019
@k8s-ci-robot k8s-ci-robot merged commit da9f3d8 into kubernetes-client:master Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

in-cluster config builder does not work properly in an ipv6 cluster

3 participants