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

Use node ip autodiscovery #1513

Closed
wants to merge 3 commits into from
Closed

Conversation

aojea
Copy link
Contributor

@aojea aojea commented Apr 25, 2020

Alternative to #1512

Fixes #1154

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 25, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: aojea
To complete the pull request process, please assign bentheelder
You can assign the PR to them by writing /assign @bentheelder in a comment when ready.

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 k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 25, 2020
@aojea aojea force-pushed the autodiscovery2 branch 2 times, most recently from 30b2b59 to 3c47665 Compare April 25, 2020 11:48
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 25, 2020
@aojea
Copy link
Contributor Author

aojea commented Apr 25, 2020

/hold
still exploring different options, there are things doesn't work yet

@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 Apr 25, 2020
@aojea
Copy link
Contributor Author

aojea commented Apr 25, 2020

the apiserver autodetection is working

I0425 21:38:14.703573     152 interface.go:262] Found valid IPv6 address fc00:db8:2::4 for interface "eth0".
I0425 21:38:14.703577     152 interface.go:411] Found active IP fc00:db8:2::4

kubelet is failing because of
#1195 (comment)

@aojea
Copy link
Contributor Author

aojea commented Apr 25, 2020

only resolve IPv6 addresses non-local nodes 🤔

root@kind-worker:/# ./lookup kind-worker
GOOS: linux
net.LookupIP addrs: [172.19.0.3]
root@kind-worker:/# ./lookup kind-control-plane
GOOS: linux
net.LookupIP addrs: [172.19.0.4 fc00:db8:2::4]
root@kind-worker:/# ./lookup kind-worker2
GOOS: linux
net.LookupIP addrs: [172.19.0.2 fc00:db8:2::2]

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 25, 2020
@aojea
Copy link
Contributor Author

aojea commented Apr 26, 2020

/assign @BenTheElder
please take a look, autodiscovery works with this PR

@@ -20,7 +20,7 @@ package nodeimage
const DefaultImage = "kindest/node:latest"

// DefaultBaseImage is the default base image used
const DefaultBaseImage = "kindest/base:v20200423-30be2258"
const DefaultBaseImage = "aojea/kindbase:auto"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is built with current PR, it's being added on a temporal commit just to test it works on CI

Copy link
Member

Choose a reason for hiding this comment

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

I'll rebase and push an image after reviewing the other changes 👍

@@ -180,6 +180,10 @@ enable_network_magic(){
cp /etc/resolv.conf /etc/resolv.conf.original
sed -e "s/${docker_embedded_dns_ip}/${docker_host_ip}/g" /etc/resolv.conf.original >/etc/resolv.conf

# use dns to resolve hostnames with more priority than files
cp /etc/nsswitch.conf /etc/nsswitch.conf.original
Copy link
Member

Choose a reason for hiding this comment

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

what was the original value?
why aren't we statically rewriting this in the baseimage build?

Copy link
Member

Choose a reason for hiding this comment

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

debian should be hosts: dns [!UNAVAIL=return] files I think, which is actually a little surprising, I thought most distros were shipping ~files dns

golang/go#35305
https://manpages.debian.org/stretch/manpages/nsswitch.conf.5.en.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are correct, the original was files dns

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 didn't think about the original bare honestly, added to the entry point because is where we are adding these hacks

@BenTheElder
Copy link
Member

rewrote the second commit and pushed a new PR #1518

@BenTheElder
Copy link
Member

superseded #1521

@aojea aojea deleted the autodiscovery2 branch August 9, 2020 08:46
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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add new k8s IPv6 configuration improvements to KIND
3 participants