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

Fix kube-router config generation #5531

Merged

Conversation

MrFreezeex
Copy link
Member

@MrFreezeex MrFreezeex commented Jan 10, 2020

What type of PR is this?
/kind bug

What this PR does / why we need it:
The cni config and the kubeconfig were not updated on a new deployment of the playbook.
The apiserver ip in the kubeconfig was sometimes incorrect.

This PR solves those two issues by generating those two files with ansible instead of relying on a configmap and an initContainer deployed on the first master.
See the issue for more details about it.

Which issue(s) this PR fixes:

Fixes #5530

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 10, 2020
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 10, 2020
@MrFreezeex
Copy link
Member Author

/assign @riverzhang

Maybe @bozzo would also be interested by this PR as he his listed as a maintainer of the kube-router deployment in #5432. I am not sure if I need to assign him to this PR though...

@bozzo
Copy link
Contributor

bozzo commented Jan 16, 2020

@MrFreezeex Good Job! It will be easier to update Kube-Router config

@MrFreezeex MrFreezeex force-pushed the fix-kube-router-kubeconfig branch 2 times, most recently from 27a2c56 to 7fecbd6 Compare January 16, 2020 19:12
Signed-off-by: Arthur Outhenin-Chalandre <[email protected]>
@MrFreezeex MrFreezeex force-pushed the fix-kube-router-kubeconfig branch from 7fecbd6 to 75e802f Compare January 16, 2020 19:19
@MrFreezeex
Copy link
Member Author

MrFreezeex commented Jan 16, 2020

I refactor a lot of my code because kube-router can write into the cni config (updating the subnet), and my previous attempt would overwrite those changes.

I fixed this by allowing the subnet in the cni config to be overwritten by the one retrieved from the host.

I have no more modification to do on this PR, let me know if further changes are needed.

Copy link

@huxcrux huxcrux left a comment

Choose a reason for hiding this comment

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

LGTM

@Miouge1
Copy link
Contributor

Miouge1 commented Mar 4, 2020

Thanks @MrFreezeex and @bozzo for getting this moving!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 4, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Miouge1, MrFreezeex

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-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 4, 2020
@k8s-ci-robot k8s-ci-robot merged commit 5888967 into kubernetes-sigs:master Mar 4, 2020
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Mar 7, 2020
SndR85 pushed a commit to SndR85/kubespray that referenced this pull request Jan 28, 2021
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. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kube-router invalid kubeconfig
6 participants