Merge pull request #51250 from dixudx/bump_cni_v0.6.0

Automatic merge from submit-queue (batch tested with PRs 53106, 52193, 51250, 52449, 53861). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

bump CNI to v0.6.0

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #49480

**Special notes for your reviewer**:
/assign @luxas @bboreham @feiskyer 

**Release note**:

```release-note
bump CNI to v0.6.0
```
This commit is contained in:
Kubernetes Submit Queue
2017-10-16 14:47:23 -07:00
committed by GitHub
15 changed files with 103 additions and 131 deletions

View File

@@ -1,55 +0,0 @@
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Build the CNI binaries.
#
# Usage:
# [ARCH=amd64] [CNI_RELEASE=v0.3.0] make (build|push)
ARCH?=amd64
CNI_RELEASE?=0799f5732f2a11b329d9e3d51b9c8f2e3759f2ff
CNI_TARBALL=cni-$(ARCH)-$(CNI_RELEASE).tar.gz
CUR_DIR=$(shell pwd)
OUTPUT_DIR=$(CUR_DIR)/output
GOLANG_VERSION=1.7.6
all: build
build:
mkdir -p $(OUTPUT_DIR)
docker run -it -v $(OUTPUT_DIR):/output:Z golang:$(GOLANG_VERSION) /bin/bash -c "\
git clone https://github.com/containernetworking/cni\
&& cd cni \
&& git checkout $(CNI_RELEASE) \
&& CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) ./build \
&& tar -zcvf $(CNI_TARBALL) bin/ \
&& mv $(CNI_TARBALL) /output/"
# Backward Compatibility
ifeq ($(ARCH),amd64)
cp $(OUTPUT_DIR)/$(CNI_TARBALL) $(OUTPUT_DIR)/cni-$(CNI_RELEASE).tar.gz
endif
push: build
gsutil cp $(OUTPUT_DIR)/$(CNI_TARBALL) gs://kubernetes-release/network-plugins
ifeq ($(ARCH),amd64)
gsutil cp $(OUTPUT_DIR)/cni-$(CNI_RELEASE).tar.gz gs://kubernetes-release/network-plugins
endif
clean:
rm -rf output/
.PHONY: all

View File

@@ -24,10 +24,10 @@ ARCH?=amd64
CACHEBUST?=1
BASEIMAGE=gcr.io/google-containers/debian-base-$(ARCH):0.2
CNI_RELEASE=0799f5732f2a11b329d9e3d51b9c8f2e3759f2ff
CNI_VERSION=v0.6.0
TEMP_DIR:=$(shell mktemp -d)
CNI_TARBALL=cni-$(ARCH)-$(CNI_RELEASE).tar.gz
CNI_TARBALL=cni-plugins-$(ARCH)-$(CNI_VERSION).tgz
.PHONY: all build push clean
@@ -48,8 +48,8 @@ ifeq ($(CACHEBUST),1)
cd ${TEMP_DIR} && sed -i.back "s|CACHEBUST|$(shell uuidgen)|g" Dockerfile
endif
mkdir -p ${TEMP_DIR}/cni-bin
tar -xz -C ${TEMP_DIR}/cni-bin -f "cni-tars/${CNI_TARBALL}"
mkdir -p ${TEMP_DIR}/cni-bin/bin
tar -xz -C ${TEMP_DIR}/cni-bin/bin -f "cni-tars/${CNI_TARBALL}"
# Register /usr/bin/qemu-ARCH-static as the handler for non-x86 binaries in the kernel
docker run --rm --privileged multiarch/qemu-user-static:register --reset

View File

@@ -56,8 +56,8 @@ docker_repositories()
http_file(
name = "kubernetes_cni",
sha256 = "05ab3937bc68562e989dc143362ec4d4275262ba9f359338aed720fc914457a5",
url = "https://storage.googleapis.com/kubernetes-release/network-plugins/cni-amd64-0799f5732f2a11b329d9e3d51b9c8f2e3759f2ff.tar.gz",
sha256 = "f04339a21b8edf76d415e7f17b620e63b8f37a76b2f706671587ab6464411f2d",
url = "https://storage.googleapis.com/kubernetes-release/network-plugins/cni-plugins-amd64-v0.6.0.tgz",
)
docker_pull(

View File

@@ -10,7 +10,8 @@ URL: https://kubernetes.io
Binaries required to provision container networking.
%prep
tar xzfv cni-*.tar.gz
mkdir -p ./bin
tar -C ./bin -xz -f cni-plugins-amd64-v0.6.0.tgz
%install