kubernetes: more flexible selection of network stack

Also move to 50 in the ordering so things can be added before as well as after.

Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
Ian Campbell 2017-09-20 16:43:17 +01:00
parent 451fe22c82
commit ac6b8dcf6a
3 changed files with 13 additions and 8 deletions

View File

@ -2,3 +2,5 @@ image-cache/common/*.tar
image-cache/common/Dockerfile
image-cache/control-plane/*.tar
image-cache/control-plane/Dockerfile
weave.yaml
network.yaml

View File

@ -1,9 +1,8 @@
KUBE_RUNTIME ?= docker
WEAVE_VERSION := v2.0.4
NETWORK ?= weave-v2.0.4
INIT_YAML ?=
INIT_YAML += weave.yaml
INIT_YAML += network.yaml
all: tag-container-images build-vm-images
@ -26,10 +25,14 @@ kube-master.iso: kube.yml $(KUBE_RUNTIME).yml $(KUBE_RUNTIME)-master.yml $(INIT_
kube-node.iso: kube.yml $(KUBE_RUNTIME).yml
moby build -name kube-node -format iso-efi -format iso-bios $^
weave.yaml:
curl -L -o $@ https://cloud.weave.works/k8s/v1.7/net?v=$(WEAVE_VERSION)
network.yaml: $(NETWORK).yaml
ln -nf $< $@
weave-%.yaml:
curl -L -o $@ https://cloud.weave.works/k8s/v1.7/net?v=$*
clean:
rm -f -r \
kube-*-kernel kube-*-cmdline kube-*-state kube-*-initrd.img *.iso
kube-*-kernel kube-*-cmdline kube-*-state kube-*-initrd.img *.iso \
weave-*.yaml network.yaml
$(MAKE) -C image-cache clean

View File

@ -42,8 +42,8 @@ files:
metadata: yaml
- path: /etc/kubernetes
symlink: "/var/lib/kubeadm"
- path: /etc/kubeadm/kube-system.init/01-weave.yaml
source: weave.yaml
- path: /etc/kubeadm/kube-system.init/50-network.yaml
source: network.yaml
- path: /etc/sysctl.d/01-kubernetes.conf
contents: 'net.ipv4.ip_forward = 1'
- path: /opt/cni