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

Enable multi-CPU architecture in Flannel CNI #6166

Merged

Conversation

electrocucaracha
Copy link
Contributor

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test

/kind feature

/kind flake

What this PR does / why we need it:
Flannel CNI provides different Docker images to support multi-CPU architectures, this change provides the daemonsets required to enable them.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:
kube_network_plugin: flannel

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 19, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @electrocucaracha. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 19, 2020
@k8s-ci-robot k8s-ci-robot requested review from bozzo and EppO May 19, 2020 16:51
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 19, 2020
@EppO
Copy link
Contributor

EppO commented May 20, 2020

CI is broken right now, need to retest this once it's fixed

@electrocucaracha
Copy link
Contributor Author

/retest

@k8s-ci-robot
Copy link
Contributor

@electrocucaracha: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@@ -42,7 +42,7 @@ data:
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: kube-flannel
name: kube-flannel-ds-amd64
Copy link
Member

Choose a reason for hiding this comment

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

To simplify multi arch support, could you use templating with a for loop in jinja ? AFAIK you just replace the arch name in 2/3 strings so It should be a good improvement...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That only applies for those case where you have an homogeneous architecture (all nodes of the cluster only using the amd64 or arm). Unfortunately the official flannel image is offered using different tags for different architectures.

Copy link
Member

@MrFreezeex MrFreezeex May 25, 2020

Choose a reason for hiding this comment

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

Yes sure, I do know that but instead of copying+pasting the deamonset x times, you can use something like {% for arch in ['amd64', 'arm64', ...] %} or something similar to generate those...

This will enable you to have a smaller set of changes and improve general maintainability.

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 25, 2020
@EppO
Copy link
Contributor

EppO commented May 28, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 28, 2020
@MrFreezeex
Copy link
Member

Just thinking about It, but maybe It would be nice to remove the old daemonset ?

@EppO
Copy link
Contributor

EppO commented May 28, 2020

Just thinking about It, but maybe It would be nice to remove the old daemonset ?

actually yes, for the upgrade use case we should test for its existence and remove it if it does because the new daemonset will have a different name.

@EppO
Copy link
Contributor

EppO commented May 28, 2020

/hold

@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 May 28, 2020
@Miouge1
Copy link
Contributor

Miouge1 commented Jul 13, 2020

@EppO and @electrocucaracha any ideas forward?

Not sure if quay supports it, but multiarch docker registry is pretty useful for multi arch support.

@electrocucaracha
Copy link
Contributor Author

@EppO and @electrocucaracha any ideas forward?

Not sure if quay supports it, but multiarch docker registry is pretty useful for multi arch support.

I think it's supported using different tags. It should be nice if the Flannel image could be offered using the BuildX plugin but I'm not sure if its source has restrictions during the build process.

@EppO
Copy link
Contributor

EppO commented Jul 16, 2020

I'm ok with the multi-arch approach but my concern is about the upgrade path, we may end up with multiple daemonsets of flannel because this code creates new ones with different names.

@SpaaarK
Copy link

SpaaarK commented Jul 31, 2020

Hi! I used this in a baremetal cluster with some amd64 and arm systems and I would like to make a suggestion:

  • Change the init container image used to be architecture specific adding also the -{{ arch }}
    All the best and thank you!

Copy link

@SpaaarK SpaaarK left a comment

Choose a reason for hiding this comment

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

Change image name for the init container also

in line 108 image: {{ flannel_image_repo }}:{{ flannel_image_tag }}-{{ arch }}

Signed-off-by: Victor Morales <v.morales@samsung.com>
@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 10, 2020
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 10, 2020
@electrocucaracha
Copy link
Contributor Author

@Miouge1 @EppO @MrFreezeex I did some changes to preserve the amd64 daemonset and I fixed the name of image for the init container, I think this version will satisfy the upgrade scenario.

@EppO
Copy link
Contributor

EppO commented Sep 2, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 2, 2020
@floryut
Copy link
Member

floryut commented Sep 21, 2020

/unhold
/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 21, 2020
@floryut
Copy link
Member

floryut commented Sep 22, 2020

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: electrocucaracha, floryut

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 Sep 22, 2020
@k8s-ci-robot k8s-ci-robot merged commit 0d0cc8c into kubernetes-sigs:master Sep 22, 2020
erulabs added a commit to kubesail/kubespray that referenced this pull request Sep 23, 2020
* 'master' of https://github.com/kubernetes-sigs/kubespray:
  remove variable 'etcd_ionice', because ionice removed from container image etcd:v3.4.x (kubernetes-sigs#6735)
  calico: default to using kdd datastore (kubernetes-sigs#6693)
  Update docker packages to 19.03.13 + add docker f32 (kubernetes-sigs#6712)
  Fix snapshot.storage apiVersion (kubernetes-sigs#6711)
  properly generate extravolumes in kubeadmconfig for centos (kubernetes-sigs#6708)
  Fix reserved memory unit in kubelet configuration (kubernetes-sigs#6725)
  Fix unintended SIGPIPE (kubernetes-sigs#6721)
  Expose offline install overrides in inventory (kubernetes-sigs#6728)
  Added ability to set calico vxlan vni and port. defaults to calico's … (kubernetes-sigs#6678)
  Change health check from TCP to HTTPS (kubernetes-sigs#6487)
  Add multi architeture support to flannel (kubernetes-sigs#6166)
  Remove pypi repo and pip extra flags (kubernetes-sigs#6729)
  Fails if kubeadm_version do not matches kubernetes version (kubernetes-sigs#6302)
  Add external_openstack_lbaas_provider setting for occm (kubernetes-sigs#6566)
  add new variable allowing additionnal audit webhook server options (kubernetes-sigs#6726)
  Fix example value for etcd_quota_backend_bytes (kubernetes-sigs#6724)
  Added support for setting tiller_service_account and tiller_replicas (kubernetes-sigs#6696)
@electrocucaracha electrocucaracha deleted the improve_flannel branch September 29, 2020 14:29
@floryut floryut mentioned this pull request Dec 19, 2020
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Jan 16, 2021
Signed-off-by: Victor Morales <v.morales@samsung.com>
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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

None yet

7 participants