-
Notifications
You must be signed in to change notification settings - Fork 502
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
WIP: build cni and kubelet debian packages #35
Conversation
Woot! Will a dependency on docker engine package be added later? |
Installing kubelet installs root@instance-5:/home/mikedanese# apt-get install -y kubelet
The following additional packages will be installed:
aufs-tools cgroupfs-mount docker-engine k8s-cni libltdl7
Suggested packages:
mountall
The following NEW packages will be installed:
aufs-tools cgroupfs-mount docker-engine k8s-cni kubelet libltdl7
0 upgraded, 6 newly installed, 0 to remove and 37 not upgraded.
Need to get 33.9 MB of archives.
After this operation, 229 MB of additional disk space will be used.
Get:1 http://us-central1.gce.archive.ubuntu.com/ubuntu xenial/universe amd64 aufs-tools amd64 1:3.2+20130722-1.1ubuntu1 [92.9 kB]
Get:2 http://us-central1.gce.archive.ubuntu.com/ubuntu xenial/universe amd64 cgroupfs-mount all 1.2 [4,970 B]
Get:3 http://us-central1.gce.archive.ubuntu.com/ubuntu xenial/main amd64 libltdl7 amd64 2.4.6-0.1 [38.3 kB]
Get:4 http://ppa.launchpad.net/k8s/ppa/ubuntu xenial/main amd64 k8s-cni amd64 0.0.1-0 [5,898 kB]
Get:5 https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 docker-engine amd64 1.11.2-0~xenial [14.5 MB]
Get:6 http://ppa.launchpad.net/k8s/ppa/ubuntu xenial/main amd64 kubelet amd64 1.3.0-1 [13.4 MB]
Fetched 33.9 MB in 5s (6,157 kB/s)
Selecting previously unselected package aufs-tools.
(Reading database ... 59822 files and directories currently installed.)
Preparing to unpack .../aufs-tools_1%3a3.2+20130722-1.1ubuntu1_amd64.deb ...
Unpacking aufs-tools (1:3.2+20130722-1.1ubuntu1) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../cgroupfs-mount_1.2_all.deb ...
Unpacking cgroupfs-mount (1.2) ...
Selecting previously unselected package libltdl7:amd64.
Preparing to unpack .../libltdl7_2.4.6-0.1_amd64.deb ...
Unpacking libltdl7:amd64 (2.4.6-0.1) ...
Selecting previously unselected package docker-engine.
Preparing to unpack .../docker-engine_1.11.2-0~xenial_amd64.deb ...
Unpacking docker-engine (1.11.2-0~xenial) ...
Selecting previously unselected package k8s-cni.
Preparing to unpack .../k8s-cni_0.0.1-0_amd64.deb ...
Unpacking k8s-cni (0.0.1-0) ...
Selecting previously unselected package kubelet.
Preparing to unpack .../kubelet_1.3.0-1_amd64.deb ...
Unpacking kubelet (1.3.0-1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu6) ...
Setting up aufs-tools (1:3.2+20130722-1.1ubuntu1) ...
Setting up cgroupfs-mount (1.2) ...
Setting up libltdl7:amd64 (2.4.6-0.1) ...
Setting up docker-engine (1.11.2-0~xenial) ...
Setting up k8s-cni (0.0.1-0) ...
Setting up kubelet (1.3.0-1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for systemd (229-4ubuntu6) ...
Processing triggers for ureadahead (0.100.0-19) ... |
cc @kubernetes/sig-node @kubernetes/release-maintainers |
Documentation=https://github.com/kubernetes/kubernetes | ||
|
||
[Service] | ||
ExecStart=/var/lib/kubelet/kubelet-wrapper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably should go into /usr/share/kubelet/kubelet-wrapper or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or rather /usr/lib/kubelet/
, as it's going to be an executable.
Overall LGTM. I have maintained debs in the past, nothing glaring. |
@mansoorj wants to make sure this will work on ubuntu (which isn't clear given the pr title). |
This currently only works on ubuntu xenial. I need to expand it to more debian flavors which involves testing an porting systemd to upstart. |
@@ -0,0 +1,18 @@ | |||
{ | |||
"cniVersion": "0.1.0", | |||
"name": "kubenet", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does kubenet only work on GCE?
Is there a convenient way to support other network drivers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not related to the kubelet kubenet plugin, (which doesn't just work on GCE, it works everywhere). This is the "name" field of the bridge cni plugin which represents the name of the network.
https://github.com/containernetworking/cni/blob/master/Documentation/bridge.md
The convenient way to support other cni plugins is add a config file that lexically sorts to a higher slot then 99_bridge.conf, e.g. 10_flannel.conf. Bridge plugin seems like a reasonable default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Then my obvious second question is, why don't we use kubenet in ALL deployments if it works everywhere? :)
No more flannel/weave dep then, unless they provide some really important side effect of course.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kubenet doesn't actually provide an overlay. We are working on turning it into a cni plugin. It will be a metaplugin that configures the bridge plugin according to the cidrs passed down by the node controller. This is very usful when running in cloud providers that supported routed networks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, then my assumption was right (that it didn't contain an overlay)
Seems like I misinterpreted your previous comment then (it clearly would have been to good to be true if kubenet did provide an overlay and worked everywhere)
Converting it into a CNI plugin SGTM
I need to look into doing this like bazel does. They are hosting the apt repository on GCS. https://bazel-review.googlesource.com/#/c/3702/ |
set -o errexit | ||
set -o pipefail | ||
|
||
source /etc/default/kubelet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd expect this to be EnvironmentFile=/etc/default/kubelet
in kubelet.service
, unless we think that users should be really allowed to do anything shell permits (like loops, conditions and sourcing other files etc)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, it looks like this file seems to be missing from the package, and this script will fail, unless user has created it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think /etc/default files are usually not env files? Is that not true? Lot's of stuff doesn't work in env files, e.g.
DOCKER_OPTS="${DOCKER_OPTS} --dns 8.8.8.8"
Wouldn't work because it requires a bash expansion
I appreciate your comments and will address in a follow up. I'm currently working on infrastructure to get these hosted on GCS and it will help to have this merged. There are definitely improvements to be made to the actual package. |
Now hosted on gcs
Unfortunately requires version pinning of docker so upgrades might be hard. |
Probably harmless but minor annoyance after
|
@lukemarsden I guess we have to put |
* Add support for ppc64, arm64, s390x Signed-off-by: Adam Stokes <battlemidget@users.noreply.github.com> * add make to aarch64 dockerfile Signed-off-by: Adam Stokes <battlemidget@users.noreply.github.com>
Flesh out CI Signal responsibilities during code freeze
To install the kubelet, cni and correct version of docker on Ubuntu 16.04:
@kubernetes/sig-cluster-lifecycle