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

[jjo] add kube-router support #3339

Merged
merged 12 commits into from
Oct 16, 2018

Conversation

jjo
Copy link
Contributor

@jjo jjo commented Sep 18, 2018

Fixes cloudnativelabs/kube-router#147.

  • add kube-router as another network_plugin choice
  • support most used kube-router flags via
    kube_router_foo vars as other plugins
  • implement replacing kube-proxy (--run-service-proxy=true) via
    kube_proxy_remove (boolean) fact
  • working around kubeadm lack of support for skipping kube-proxy
    daemonset creation (Make kube-proxy optional (default to install) kubernetes/kubeadm#776) by removing it
    after kubeadm run, added a caveat note to doc/kube-router.md
  • verified working both on kubeadm_enabled: true|false

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 18, 2018
@jjo
Copy link
Contributor Author

jjo commented Sep 18, 2018

/cc @murali-reddy @andrewsykim

@k8s-ci-robot
Copy link
Contributor

@jjo: GitHub didn't allow me to request PR reviews from the following users: murali-reddy, andrewsykim.

Note that only kubernetes-incubator members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @murali-reddy @andrewsykim

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.

@jjo
Copy link
Contributor Author

jjo commented Sep 18, 2018

FYI I have it working over an openstack deploy, with

kube_network_plugin: kube-router
# [... default settings ...]
kube_proxy_mode: none
kube_router_run_service_proxy: true

Still has some rough edges:

  • requiring kube_proxy_mode: none for --run-service-proxy
    (should be set_fact really)
  • CI test files done mostly copypasta-ed from other plugins,
    need some knowledgeable review

Copy link
Member

@woopstar woopstar left a comment

Choose a reason for hiding this comment

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

The readme file must also be updated with the network plugin and version.

roles/download/defaults/main.yml Show resolved Hide resolved

# Enables Service Proxy -- sets up IPVS for Kubernetes Services
# TODO(jjo): this setting currently requires also:
# - no kubeadm_enabled
Copy link
Member

Choose a reason for hiding this comment

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

If this is yet not supported, do a check in the pre-install stage to make sure it does not happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion:

  • added assertion on not kubeadm_enabled
  • added set_fact to override kube_proxy_mode: none if kube-router is set to replace it

readOnly: true
initContainers:
- name: install-cni
image: busybox
Copy link
Member

Choose a reason for hiding this comment

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

busybox image is in the downloads file too. Please update to ansible var

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, although I added a busybox_image_repo (_tag)
as I don't feel like using test_image_repo (and _tag) for
critical kube-router pods functionality.

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 19, 2018
@jjo jjo force-pushed the jjo-add-kube-router-support branch from c542723 to 1fad254 Compare September 19, 2018 19:07
@jjo
Copy link
Contributor Author

jjo commented Sep 19, 2018

Thanks @woopstar for the thorough review, addressed your comments, PTAL
(fyi had to rebase for some conflicts).

@jjo jjo force-pushed the jjo-add-kube-router-support branch from 1fad254 to d784960 Compare September 19, 2018 19:09
@@ -44,6 +44,12 @@
- { name: openstack_lbaas_enabled, value: "{{ openstack_lbaas_enabled }}" }
ignore_errors: "{{ ignore_assert_errors }}"

- name: Stop if kube-router chosen as network_plugin and kubeadm_enabled (not yet supported/verified)
Copy link
Member

Choose a reason for hiding this comment

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

This is actually a problem. We are about to switch to use kubeadm as default deployment as you can see in #3301

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool, thanks for the note -- I've reworked logic, and verified ok
also with kubeadm_enabled installs (noting a caveat re: kubeadm
lack of support for skipping kube-proxy deploy).

@woopstar woopstar added this to the 2.7 milestone Sep 20, 2018
@jjo jjo force-pushed the jjo-add-kube-router-support branch 2 times, most recently from eb93517 to bd4442f Compare September 20, 2018 23:42
@jjo
Copy link
Contributor Author

jjo commented Sep 20, 2018

Thanks again @woopstar for the re^2view, reworked it for kubeadm_enabled
support, PTAL.

@jjo jjo force-pushed the jjo-add-kube-router-support branch from 4111856 to 0ce4454 Compare September 20, 2018 23:53
@Atoms
Copy link
Member

Atoms commented Sep 21, 2018

ci check this

@jjo jjo force-pushed the jjo-add-kube-router-support branch 2 times, most recently from 70d9193 to e6c3291 Compare September 22, 2018 16:19
@jjo
Copy link
Contributor Author

jjo commented Sep 22, 2018

Addressed latest @woopstar comments, tnx again.

@woopstar woopstar modified the milestones: 2.7, v2.8 Sep 26, 2018
@jjo jjo force-pushed the jjo-add-kube-router-support branch 2 times, most recently from c4ee8ef to fba686a Compare September 29, 2018 22:35
@ant31
Copy link
Contributor

ant31 commented Oct 4, 2018

why are the job allow to failed ?

@methodx
Copy link
Contributor

methodx commented Oct 8, 2018

Hi @jjo
Please, check my PR.

Should be handy for kubernetes version >=v1.12.0

@jjo jjo force-pushed the jjo-add-kube-router-support branch from 241bbbb to 8753a01 Compare October 9, 2018 01:24
@jjo
Copy link
Contributor Author

jjo commented Oct 9, 2018

Hi @jjo
Please, check my PR.

Should be handy for kubernetes version >=v1.12.0

Thanks @methodx!, adapted manifest tolerations to match other CNIs,
see 8753a01, leaving feedback
at your PR re: other changes.

@jjo jjo force-pushed the jjo-add-kube-router-support branch from 8753a01 to 5395c6f Compare October 11, 2018 02:24
@woopstar
Copy link
Member

CI tests all good.

Can you squash commits.

And also add PriorityClass to the deployment - see #3361

Think we can merge after that, then.

@ant31
Copy link
Contributor

ant31 commented Oct 15, 2018

@woopstar we have autosquash now

@jjo
Copy link
Contributor Author

jjo commented Oct 15, 2018

@woopstar: added PriorityClass to kube-router DaemonSet,
lemme know if you want me to squash commits, iiuc from @ant31
wouldn't be needed (but obviously fine to do so nevertheless).

jjo added 12 commits October 15, 2018 16:13
Fixes cloudnativelabs/kube-router#147.

* add kube-router as another network_plugin choice
* support most used kube-router flags via
  `kube_router_foo` vars as other plugins
* implement replacing kube-proxy (--run-service-proxy=true) via
  `kube_proxy_mode: none`, verified in a _non kubeadm_enabled_
  install, should also work for recent kubeadm releases via
  `skipKubeProxyInstall: true` config
- verify it working ok w/the kubeadm_enabled and
  kube_router_run_service_proxy true or false

- introduce `kube_proxy_remove` fact, to decouple logic
  from kube_proxy_mode (which affects kubeadm configmap
  settings, thus no-good to ab-use it to 'none')
@woopstar
Copy link
Member

/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 Oct 16, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: woopstar

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 Oct 16, 2018
@k8s-ci-robot k8s-ci-robot merged commit a5edd0d into kubernetes-sigs:master Oct 16, 2018
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants