Skip to content

Commit

Permalink
Merge pull request #6784 from afbjorklund/cni-upgrade
Browse files Browse the repository at this point in the history
Upgrade cni and cni-plugins to spec 0.4.0
  • Loading branch information
medyagh authored Mar 5, 2020
2 parents 1327f9d + c33a5cc commit b75d62f
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 22 deletions.
2 changes: 2 additions & 0 deletions deploy/iso/minikube-iso/package/cni-plugins/cni-plugins.hash
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
sha256 f04339a21b8edf76d415e7f17b620e63b8f37a76b2f706671587ab6464411f2d cni-plugins-amd64-v0.6.0.tgz
sha256 8589670f7f9b211a351dfcd211d4fe0b961d77283a7415443dc188f3dbf05668 v0.6.0.tar.gz
sha256 92c7599918be0a720ac020f137cdeac746dfa03da6b26e08a37132c5728c091f v0.7.5.tar.gz
sha256 9d1526ed965ac6562fd95a931ab2346b3c5efd58c2f569038ba3c530f7e66472 v0.8.5.tar.gz
31 changes: 20 additions & 11 deletions deploy/iso/minikube-iso/package/cni-plugins/cni-plugins.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
################################################################################

CNI_PLUGINS_VERSION = v0.6.0
CNI_PLUGINS_VERSION = v0.8.5
CNI_PLUGINS_SITE = https://github.com/containernetworking/plugins/archive
CNI_PLUGINS_SOURCE = $(CNI_PLUGINS_VERSION).tar.gz
CNI_PLUGINS_LICENSE = Apache-2.0
Expand All @@ -16,13 +16,22 @@ CNI_PLUGINS_MAKE_ENV = \
CGO_ENABLED=0 \
GO111MODULE=off

CNI_PLUGINS_BUILDFLAGS = -a --ldflags '-extldflags \"-static\"'
CNI_PLUGINS_BUILDFLAGS = -a -ldflags '-extldflags -static -X github.com/containernetworking/plugins/pkg/utils/buildversion.BuildVersion=$(CNI_PLUGINS_VERSION)'


define CNI_PLUGINS_BUILD_CMDS
(cd $(@D); $(CNI_PLUGINS_MAKE_ENV) ./build.sh $(CNI_PLUGINS_BUILDFLAGS))
(cd $(@D); $(CNI_PLUGINS_MAKE_ENV) ./build_linux.sh $(CNI_PLUGINS_BUILDFLAGS))
endef

define CNI_PLUGINS_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 \
$(@D)/bin/bandwidth \
$(TARGET_DIR)/opt/cni/bin/bandwidth

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

$(INSTALL) -D -m 0755 \
$(@D)/bin/bridge \
$(TARGET_DIR)/opt/cni/bin/bridge
Expand All @@ -47,14 +56,6 @@ define CNI_PLUGINS_INSTALL_TARGET_CMDS
../../opt/cni/bin/tuning \
$(TARGET_DIR)/usr/bin/tuning

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

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

$(INSTALL) -D -m 0755 \
$(@D)/bin/ptp \
$(TARGET_DIR)/opt/cni/bin/ptp
Expand Down Expand Up @@ -119,6 +120,14 @@ define CNI_PLUGINS_INSTALL_TARGET_CMDS
ln -sf \
../../opt/cni/bin/dhcp \
$(TARGET_DIR)/usr/bin/dhcp

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

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

$(eval $(generic-package))
2 changes: 2 additions & 0 deletions deploy/iso/minikube-iso/package/cni/cni.hash
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ sha256 b1ae09833a238c51161918a8849031efdb46cf0068ea5b752e362d9836e2af7d cni-v0.
sha256 84c9a0a41b59211d560bef14bf3f53bb370156f9ac7762270b3848fed96e1be8 cni-v0.4.0.tgz
sha256 a7f84a742c8f3a95843b3cc636444742554a4853835649ec371a07c841daebab cni-amd64-v0.6.0.tgz
sha256 802f4a002b4eb774624a9dc1c859d3c9926eb2d862e66a673fc99cfc8bcd7494 v0.6.0.tar.gz
sha256 78d57477d6b0ab9dc4d75ce9f275302d2f379206b5326503e57d9c08b76484c1 v0.7.0.tar.gz
sha256 4517eabfd65aea2012dc48d057bf889a0a41ed9837387d95cd1e36c0dbddcfd4 v0.7.1.tar.gz
23 changes: 12 additions & 11 deletions deploy/iso/minikube-iso/package/cni/cni.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,34 @@
#
################################################################################

CNI_VERSION = v0.6.0
CNI_VERSION = v0.7.1
CNI_SITE = https://github.com/containernetworking/cni/archive
CNI_SOURCE = $(CNI_VERSION).tar.gz
CNI_LICENSE = Apache-2.0
CNI_LICENSE_FILES = LICENSE

CNI_DEPENDENCIES = host-go

CNI_GOPATH = $(@D)/_output
CNI_MAKE_ENV = \
CGO_ENABLED=0 \
GO111MODULE=off
GO111MODULE=off \
GOPATH="$(CNI_GOPATH)" \
GOBIN="$(CNI_GOPATH)/bin" \
PATH=$(CNI_GOPATH)/bin:$(BR_PATH)

CNI_BUILDFLAGS = -a --ldflags '-extldflags \"-static\"'

define CNI_CONFIGURE_CMDS
mkdir -p $(CNI_GOPATH)/src/github.com/containernetworking
ln -sf $(@D) $(CNI_GOPATH)/src/github.com/containernetworking/cni
endef

define CNI_BUILD_CMDS
(cd $(@D); $(CNI_MAKE_ENV) ./build.sh $(CNI_BUILDFLAGS))
(cd $(@D); $(CNI_MAKE_ENV) go build -o bin/cnitool $(CNI_BUILDFLAGS) ./cnitool)
endef

define CNI_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 \
$(@D)/bin/noop \
$(TARGET_DIR)/opt/cni/bin/noop

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

$(INSTALL) -D -m 0755 \
$(@D)/bin/cnitool \
$(TARGET_DIR)/opt/cni/bin/cnitool
Expand Down

0 comments on commit b75d62f

Please sign in to comment.