Skip to content

Commit

Permalink
Merge pull request kubernetes#8 from s-urbaniak/cni
Browse files Browse the repository at this point in the history
Enable CNI
  • Loading branch information
Sergiusz Urbaniak authored Sep 8, 2016
2 parents 3e7c1f9 + 7c2e6b7 commit 33c9fd2
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
19 changes: 19 additions & 0 deletions board/coreos/minikube/rootfs-overlay/etc/cni/net.d/k8s.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "rkt.kubernetes.io",
"type": "bridge",
"bridge": "mybridge",
"mtu": 1460,
"addIf": "true",
"isGateway": true,
"ipMasq": true,
"ipam": {
"type": "host-local",
"subnet": "10.1.0.0/16",
"gateway": "10.1.0.1",
"routes": [
{
"dst": "0.0.0.0/0"
}
]
}
}
1 change: 1 addition & 0 deletions configs/minikube_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_PARTED=y
BR2_PACKAGE_CA_CERTIFICATES=y
BR2_PACKAGE_BRIDGE_UTILS=y
BR2_PACKAGE_IPROUTE2=y
BR2_PACKAGE_IPTABLES=y
BR2_PACKAGE_OPENSSH=y
BR2_PACKAGE_SOCAT=y
Expand Down
22 changes: 21 additions & 1 deletion package/cni-bin/cni-bin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,27 @@ CNI_BIN_SOURCE = cni-v$(CNI_BIN_VERSION).tgz
define CNI_BIN_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 \
$(@D)/bridge \
$(TARGET_DIR)/bin/bridge
$(TARGET_DIR)/opt/cni/bin/bridge

ln -sf \
../../opt/cni/bin/bridge \
$(TARGET_DIR)/usr/bin/bridge

$(INSTALL) -D -m 0755 \
$(@D)/host-local \
$(TARGET_DIR)/opt/cni/bin/host-local

ln -sf \
../../opt/cni/bin/host-local \
$(TARGET_DIR)/usr/bin/host-local

$(INSTALL) -D -m 0755 \
$(@D)/loopback \
$(TARGET_DIR)/opt/cni/bin/loopback

ln -sf \
../../opt/cni/bin/loopback \
$(TARGET_DIR)/usr/bin/loopback
endef

$(eval $(generic-package))

0 comments on commit 33c9fd2

Please sign in to comment.