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

Update "runtimecfg node-ip" for dual-stack #110

Merged

Conversation

danwinship
Copy link
Contributor

In kube 1.20 you can pass two IPs to kubelet --node-ip, but we still need help from runtimecfg to find the right IPs.

First commit is just a reorg, second commit adds unit tests without changing functionality, and then the third commit changes the utils functions to return dual-stack answers and changes runtimecfg to make use of it. (Previously the utils functions returned multiple IPs of the same family but the caller only ever used the first value, so this just changes it to return only that first value, plus a second value of the opposite family.)

(I still need to write the corresponding MCO change and test it all...)

and remove unused GetFirstAddr function
@danwinship danwinship force-pushed the dual-stack-addresses branch 2 times, most recently from 4c61df9 to 696e218 Compare December 2, 2020 22:38
When "runtimecfg node-ip" is called on a node with dual-stack IPs, set
"KUBELET_NODE_IPS=<primary-ip>,<secondary-ip>" (in addition to still setting
KUBELET_NODE_IP to the primary IP).

On single-stack nodes, we also set KUBELET_NODE_IPS, but it's
identical to KUBELET_NODE_IP. (Doing things this way makes it easier
to consume the output from a systemd service file in MCO.)
@danwinship danwinship changed the title WIP Update "runtimecfg node-ip" for dual-stack Update "runtimecfg node-ip" for dual-stack Dec 3, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 3, 2020
@danwinship
Copy link
Contributor Author

MCO change is openshift/machine-config-operator#2277, and this is now tested.

Copy link
Member

@cybertron cybertron left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 3, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cybertron, danwinship

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 3, 2020
@openshift-merge-robot openshift-merge-robot merged commit a9f2b44 into openshift:master Dec 3, 2020
@danwinship danwinship deleted the dual-stack-addresses branch December 3, 2020 22:32
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants