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

Report node DNS info with --node-ip #63170

Merged
merged 1 commit into from May 11, 2018

Conversation

@micahhausler
Member

micahhausler commented Apr 25, 2018

What this PR does / why we need it:
This PR adds ExternalDNS, InternalDNS, and ExternalIP info for kubelets with the --nodeip flag enabled.

Which issue(s) this PR fixes
Fixes #63158

Special notes for your reviewer:

I added a field to the Kubelet to make IP validation more testable (validateNodeIP relies on the net package and the IP address of the host that is executing the test.) I also converted the test to use a table so new cases could be added more easily.

Release Notes

Report node DNS info with --node-ip flag

@andrewsykim
@nckturner

/sig node
/sig network

@andrewsykim

This comment has been minimized.

Member

andrewsykim commented Apr 26, 2018

Thanks for the PR @micahhausler! There's some assumptions from nodecontroller that also overrides node addresses when kubelet sets --node-ip and --cloud-provider=external (https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/cloud/node_controller.go#L181-L189). I think removing this should fix it.

@andrewsykim

This comment has been minimized.

Member

andrewsykim commented Apr 26, 2018

/ok-to-test

@micahhausler

This comment has been minimized.

Member

micahhausler commented Apr 27, 2018

@andrewsykim Done!

glog.Errorf("Specified Node IP not found in cloudprovider")
return
}
nodeAddresses = []v1.NodeAddress{*nodeIP}

This comment has been minimized.

@andrewsykim

andrewsykim Apr 27, 2018

Member

sorry I wasn't clear earlier. I think we should still validate that nodeIP suggested by user exists, but we don't need to override the entire slice here with

nodeAddresses = []v1.NodeAddress{*nodeIP}

This comment has been minimized.

@andrewsykim

andrewsykim Apr 27, 2018

Member

You can probably just port the changes from #63101

This comment has been minimized.

@micahhausler
Report node DNS info with --node-ip
```release-note
Report node DNS info with --node-ip flag
```
@micahhausler

This comment has been minimized.

Member

micahhausler commented Apr 27, 2018

/test pull-kubernetes-e2e-gce

@andrewsykim

This comment has been minimized.

Member

andrewsykim commented Apr 28, 2018

@bowei

This comment has been minimized.

Member

bowei commented May 1, 2018

/assign @yujuhong looks like a kubelet change

@nckturner

LGTM!

@@ -521,6 +521,7 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration,
containerManager: kubeDeps.ContainerManager,
containerRuntimeName: containerRuntime,
nodeIP: parsedNodeIP,
nodeIPValidator: validateNodeIP,

This comment has been minimized.

@nckturner

nckturner May 2, 2018

Contributor

I think this is a pretty clean way of allowing validateNodeIP() to be mocked for testing. The alternative I can think of is to create a kubelet wrapper for net.InterfaceAddrs() to allow you test get testing coverage for the validateNodeIP() function itself.

@micahhausler

This comment has been minimized.

Member

micahhausler commented May 3, 2018

/test pull-kubernetes-verify
/test pull-kubernetes-e2e-gce

@micahhausler

This comment has been minimized.

Member

micahhausler commented May 3, 2018

/test pull-kubernetes-e2e-gce

4 similar comments
@micahhausler

This comment has been minimized.

Member

micahhausler commented May 7, 2018

/test pull-kubernetes-e2e-gce

@micahhausler

This comment has been minimized.

Member

micahhausler commented May 7, 2018

/test pull-kubernetes-e2e-gce

@micahhausler

This comment has been minimized.

Member

micahhausler commented May 7, 2018

/test pull-kubernetes-e2e-gce

@micahhausler

This comment has been minimized.

Member

micahhausler commented May 8, 2018

/test pull-kubernetes-e2e-gce

@micahhausler

This comment has been minimized.

Member

micahhausler commented May 8, 2018

/test pull-kubernetes-local-e2e-containerized

@micahhausler

This comment has been minimized.

Member

micahhausler commented May 8, 2018

@bowei Can you PTAL? Thanks!

@jagosan

This comment has been minimized.

Contributor

jagosan commented May 11, 2018

@yujuhong - bumping this as I think bowei is ooo for a couple of days. Can you take a look at this?

@dchen1107

This comment has been minimized.

Member

dchen1107 commented May 11, 2018

/lgtm

@k8s-ci-robot

This comment has been minimized.

Contributor

k8s-ci-robot commented May 11, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewsykim, dchen1107, micahhausler

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

@k8s-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented May 11, 2018

/test all [submit-queue is verifying that this PR is safe to merge]

@micahhausler

This comment has been minimized.

Member

micahhausler commented May 11, 2018

/milestone v1.10

@k8s-ci-robot

This comment has been minimized.

Contributor

k8s-ci-robot commented May 11, 2018

@micahhausler: You must be a member of the kubernetes-milestone-maintainers github team to set the milestone.

In response to this:

/milestone v1.10

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.

@micahhausler

This comment has been minimized.

Member

micahhausler commented May 11, 2018

@dchen1107 Can you add this to 1.10 so it can get backported?

@k8s-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented May 11, 2018

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-merge-robot k8s-merge-robot merged commit 6017f6d into kubernetes:master May 11, 2018

15 of 16 checks passed

Submit Queue Required Github CI test is not green: pull-kubernetes-e2e-gce
Details
cla/linuxfoundation micahhausler authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce Job succeeded.
Details
pull-kubernetes-local-e2e Skipped
pull-kubernetes-local-e2e-containerized Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details

k8s-merge-robot added a commit that referenced this pull request Aug 1, 2018

Merge pull request #63737 from micahhausler/automated-cherry-pick-of-#…
…63170-upstream-release-1.10

Automatic merge from submit-queue.

Automated cherry pick of #63170: Report node DNS info with --node-ip

Cherry pick of #63170 on release-1.10.

#63170: Report node DNS info with --node-ip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment