Commit Graph

5164 Commits

Author SHA1 Message Date
David Scott
eb7eff8ad7 kubernetes: allow yaml to be provided via metadata
Previously the network policy yaml had to be hard-coded in the image.
This patch allows the policy to be added via the metadata directories:

- /var/config/cni/etc/net.d/
- /var/config/kube-system.init/

Signed-off-by: David Scott <dave.scott@docker.com>
2017-11-11 12:04:36 +00:00
Rolf Neugebauer
815d8da2ed
Merge pull request #2700 from ijc/kubernetes
Kubernetes updates
2017-11-10 22:41:37 +00:00
Ian Campbell
e7327db49f kubernetes: bump yaml
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-10 14:51:23 +00:00
Ian Campbell
c08c77e3c8 kubernetes: bump to cri-containerd master
This includes a bump to use containerd v1.0.0-beta.3.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-10 14:50:11 +00:00
Ian Campbell
cf01aa4c8d kubernetes: Add a simple bridged option for KUBE_NETWORK
This has no kube object(s) but just arranges for the CNI configuration to be
written in the right place. The CNI bridge, loopback etc binaries are already
included since they are in the reference set.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-10 14:50:11 +00:00
Ian Campbell
ed0e79aa9d kubernetes: Refactor network provider selection
KUBE_NETWORK now specifies a yml which is passed to the Moby tool, which can
introduce files into /etc/kubeadm/kube-system.init/ or do other things as it
likes.

In the case of weave this just adds the weave yaml to that directory. To avoid
too much confusion between weave.yml (Moby tool input) and `weave.yaml` (the
kubernetes `ServiceAccount`, `DeamonsSet` etc object specs) name the latter
`kube-weave.yaml`.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-10 14:50:11 +00:00
Ian Campbell
22cdd22184 kubernetes: Only build the relevant image for the platform
Building both BIOS and EFI variants is a waste of time in most cases, instead
just build whichever one is relevant to the platform (which currently means EFI
on Darwin and BIOS everywhere else).

At the same time make it possible to pass "KUBE_FORMATS" (a space separated
list of targets) to the build e.g. `make KUBE_FORMATS="iso-efi iso-bios"` will
preserve the behaviour prior to this patch.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-10 14:50:11 +00:00
Ian Campbell
425553d390 kubernetes: better tolerate bad contents of /etc/kubeadm/kube-system.init/
Specifically ignore present-but-empty files entirely and ignore (but log)
failure to apply any one file.

Ignoring an empty file is useful because it means you can clobber a file which
might be referenced from an images binds without needing to override those
binds (since that generally means duplicating the whole lot which is annoying).

Ignoring any failures to apply means the rest gets applied and the rest of the
script (including untaint and the stamp file creation) still happen, resulting
in a system where the admin just has to address the failures rather than the
remaining updates. We touch a file to indicate failure generally plus one to
indicate the specific yaml which failed to apply.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-10 14:50:11 +00:00
Rolf Neugebauer
581cbdd1e8
Merge pull request #2701 from rn/vpnkit
Add support for publish port on localhost to the hyperkit backend
2017-11-10 13:29:02 +00:00
Ian Campbell
1e2dff62fc
Merge pull request #2705 from ijc/linuxkit-pkg
linuxkit pkg: Handle build --dev later
2017-11-10 13:26:01 +00:00
Rolf Neugebauer
4b9bf071e5 Update hyperkit vendoring
This includes using ftruncate for speedier disk creation

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-10 11:52:45 +00:00
Rolf Neugebauer
a9e6f37958 doc: Update networking section of platform-hyperkit.md
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-10 11:52:45 +00:00
Rolf Neugebauer
d29cc52be4 examples: Fix the vpnkit-forwarder example
The 'vpnkit-forwarder' packages lacked the vpnkit-expose-port which
was removed in f48a2bfe12 ("pkg: update vpnkit-forwarder").

It is not longer needed as the vpnkit-expose-port functionality
was integrated into 'linuskit run'

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-10 11:52:45 +00:00
Rolf Neugebauer
bc84fab42f vendor: remove github.com/satori/go.uuid
With the switch to github.com/satori/go.uuid this is no
longer needed. Strangely, it was not in vendor.conf...

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-10 11:52:45 +00:00
Rolf Neugebauer
638f15e1f8 tool/qemu: Switch to use github.com/google/uuid
With the hyperkit backend switched to this UUID package
switch qemu as well.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-10 11:52:44 +00:00
Rolf Neugebauer
c45179dce8 tool/hyperkit: Rename uuid.vpnkit to vpnkit.uuid
Other vpnkit related files start with vpnkit too.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-10 11:52:44 +00:00
Rolf Neugebauer
69501a8b26 tool/hyperkit: Add ability to expose port on localhost
When hyperkit is used with VPNKit we can "publish" VM ports
on localhost by using an API to the VPNKit process.

This commit adds a "-publish" flag to the hyperkit backend
exposing this functionality. "-publish" can be used multiple
times and is used the same way as for the qemu backend.

Other changes:
- Use 'github.com/google/uuid' as the 'uuid' package since
  VPKNkit uses it
- use 'vpnkit' prefix instead of 'vpnKit'
- Improve logging

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-10 11:52:44 +00:00
Ian Campbell
012e6fe9d1 linuxkit pkg: Handle build --dev later
The placement in #2679 can never have worked since we parse the yml over the
struct later on.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-10 10:16:19 +00:00
Avi Deitcher
443e47c408
Merge pull request #2702 from arm64b/remove-grub2-patches
tools: Remove the CoreOS grub2 patches
2017-11-10 10:42:44 +02:00
Dennis Chen
807c60c0c6 tools: Remove the CoreOS grub2 patche
Remove the grub2 patch from LinuxKit since it has already been merged
into the CoreOS grub2 mainline code.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2017-11-10 06:25:40 +00:00
Rolf Neugebauer
6a159585e9 Vendor vpnkit go bindings
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-09 16:02:54 +00:00
Rolf Neugebauer
fe953f6bc2 tool: Move multipleFlag handling to utils.go
It's a generic thing and may be shared by other code.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-09 16:02:54 +00:00
Rolf Neugebauer
a272eba740 tool: Make ports uint16
The type of the guest and host ports should be uint16 not int. Also
make them public member of the PublishPort structure.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-09 16:02:54 +00:00
Rolf Neugebauer
d4517bc26f tool: Move the code for parsing published ports to utils.go
This code will soon be shared by other backends.

While at it, also rename the type to PublishPort (from publishPorts)
as it is just one Port and the function from splitPublish() to
NewPublishPort() as this seems more go like.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-09 16:02:54 +00:00
Ian Campbell
abe13b1f44
Merge pull request #2699 from ijc/containerd-v1.0.0-beta.3
Bump to containerd v1.0.0-beta.3
2017-11-09 15:11:11 +00:00
Ian Campbell
eb491824ba Update linuxkit.packages.getty-containerd for ctr changes
`ctr pull` → `ctr images pull`

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-09 13:50:51 +00:00
Ian Campbell
a5f4da2ebb Bump yml for containerd v1.0.0-beta.3
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-09 10:16:33 +00:00
Ian Campbell
61ca751840 Bump packages to new alpine w/ containerd v1.0.0-beta.3
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-09 10:16:33 +00:00
Ian Campbell
73cf544d33 alpine: bump to containerd containerd-v1.0.0-beta.3
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-09 10:16:33 +00:00
Justin Cormack
dd6087098b
Merge pull request #2694 from rn/debug
pkglib: Enable runtime debug output
2017-11-07 21:27:50 +00:00
Rolf Neugebauer
f97b885bef pkglib: Enable runtime debug output
Log commands executed when '-v' is used on the commandline.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-07 15:31:57 +00:00
Ian Campbell
c68ed82f99
Merge pull request #2690 from ijc/circleci
Add Circle CI runes
2017-11-07 13:53:08 +00:00
Rolf Neugebauer
c2e1700033
Merge pull request #2692 from rn/rpi3-doc
docs: Add documentation for the Raspberry Pi 3b
2017-11-07 13:36:46 +00:00
Ian Campbell
1332ab979e Remove travis.yml
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-07 11:48:56 +00:00
Rolf Neugebauer
3286376054 docs: Add documentation for the Raspberry Pi 3b
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-07 11:23:44 +00:00
Ian Campbell
1cb4d173e4 Add Circle CI runes
Advantage over Travis for this usecase is the automatic artifact handling
without needing to mess with S3 or similar, making it simple to offer
downloads.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-07 10:17:44 +00:00
Ian Campbell
479e183c8a local-build: build a static + stripped binary by default
On Linux enable pie too.

Lastly, give the user control over the target name (e.g. to allow them to build
with a GOOS+GOARCH suffix).

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-07 10:17:44 +00:00
Ian Campbell
2bc91c65e3
Merge pull request #2688 from pgayvallet/disable-kube
Kubernetes : add capability not to start kubelet
2017-11-07 09:53:07 +00:00
Rolf Neugebauer
678adbd784
Merge pull request #2693 from deitch/single-rng
Remove double invocation of virtio-rng-pci
2017-11-07 08:42:38 +00:00
Avi Deitcher
2460b45397 Remove double invocation of virtio-rng-pci
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2017-11-07 09:17:51 +02:00
Rolf Neugebauer
626adf5375
Merge pull request #2689 from rn/kconfig
Tweak kernel configuration
2017-11-06 17:36:32 +00:00
pgayvallet
179c82e0cb Move kubelet.sh.conf sourcing before exit checks
Signed-off-by: pgayvallet <pierre.gayvallet@gmail.com>
2017-11-06 17:32:59 +01:00
Justin Cormack
7485f2b6bf
Merge pull request #2686 from rn/random
qemu: Use /dev/urandom on Linux for virtio-rng-pci
2017-11-06 15:26:46 +00:00
Rolf Neugebauer
48ddaf9f44 kernel: Disable CONFIG_SCSI_PROC_FS on all kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-06 15:04:05 +00:00
Rolf Neugebauer
8500ac20ca kernel: Enable DSAF for HiSilicon arm64 servers
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-06 14:58:27 +00:00
pgayvallet
ba8e01bf13 Add capability to not start kubelet depending on either a configuration file or an environment variable.
Signed-off-by: pgayvallet <pierre.gayvallet@gmail.com>
2017-11-06 15:08:22 +01:00
Rolf Neugebauer
0c997129f5 qemu: Use /dev/urandom on Linux for virtio-rng-pci
On Linux the default is /dev/random which may block if there
is not enough entropy (and it determines lack of entropy
conservatively). /dev/urandom never blocks but is fed from
the same entropy source as /dev/random so this change should
not affect platforms which have hardware RNGs but helps to
prevent stalls on platforms, in particular some arm64 platforms,
where the hardware RNG is either not present or not enabled.

If you really care about proper entropy inside a VM do not use
'linuxkit run', it's mostly for testing and shouldn't be used
for production anyway.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-06 14:07:48 +00:00
Justin Cormack
2902764b87
Merge pull request #2649 from w9n/kube_init
Kubernetes: Autoinit and persistent state by default
2017-11-05 14:54:03 +00:00
Rolf Neugebauer
3209cb0393
Merge pull request #2679 from ijc/linuxkit-pkg-dev-mode
linuxkit pkg: add `--dev` to force local org and hash
2017-11-05 14:49:20 +00:00
Rolf Neugebauer
ee24626b4b
Merge pull request #2680 from justincormack/foobar
Remove accidental example commits
2017-11-05 14:49:04 +00:00