From 7cdbb6ae8f42e56f49d9ddd64e9e70869df3121f Mon Sep 17 00:00:00 2001 From: Di Xu Date: Thu, 24 Aug 2017 12:57:04 +0800 Subject: [PATCH 1/4] bump cni vendor to v0.6.0 --- Godeps/Godeps.json | 24 +++++----- .../cni/pkg/invoke/args.go | 17 ++++--- .../cni/pkg/invoke/raw_exec.go | 8 +--- .../cni/pkg/types/020/types.go | 16 ++++--- .../containernetworking/cni/pkg/types/args.go | 15 ++++++- .../cni/pkg/types/current/types.go | 45 +++++++++++-------- .../cni/pkg/types/types.go | 6 ++- 7 files changed, 78 insertions(+), 53 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 46c39dd6a08..9522823b0b9 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -439,33 +439,33 @@ }, { "ImportPath": "github.com/containernetworking/cni/libcni", - "Comment": "v0.5.2", - "Rev": "137b4975ecab6e1f0c24c1e3c228a50a3cfba75e" + "Comment": "v0.6.0", + "Rev": "a7885cb6f8ab03fba07852ded351e4f5e7a112bf" }, { "ImportPath": "github.com/containernetworking/cni/pkg/invoke", - "Comment": "v0.5.2", - "Rev": "137b4975ecab6e1f0c24c1e3c228a50a3cfba75e" + "Comment": "v0.6.0", + "Rev": "a7885cb6f8ab03fba07852ded351e4f5e7a112bf" }, { "ImportPath": "github.com/containernetworking/cni/pkg/types", - "Comment": "v0.5.2", - "Rev": "137b4975ecab6e1f0c24c1e3c228a50a3cfba75e" + "Comment": "v0.6.0", + "Rev": "a7885cb6f8ab03fba07852ded351e4f5e7a112bf" }, { "ImportPath": "github.com/containernetworking/cni/pkg/types/020", - "Comment": "v0.5.2", - "Rev": "137b4975ecab6e1f0c24c1e3c228a50a3cfba75e" + "Comment": "v0.6.0", + "Rev": "a7885cb6f8ab03fba07852ded351e4f5e7a112bf" }, { "ImportPath": "github.com/containernetworking/cni/pkg/types/current", - "Comment": "v0.5.2", - "Rev": "137b4975ecab6e1f0c24c1e3c228a50a3cfba75e" + "Comment": "v0.6.0", + "Rev": "a7885cb6f8ab03fba07852ded351e4f5e7a112bf" }, { "ImportPath": "github.com/containernetworking/cni/pkg/version", - "Comment": "v0.5.2", - "Rev": "137b4975ecab6e1f0c24c1e3c228a50a3cfba75e" + "Comment": "v0.6.0", + "Rev": "a7885cb6f8ab03fba07852ded351e4f5e7a112bf" }, { "ImportPath": "github.com/coreos/etcd/alarm", diff --git a/vendor/github.com/containernetworking/cni/pkg/invoke/args.go b/vendor/github.com/containernetworking/cni/pkg/invoke/args.go index ba9d0c3b849..39b63972305 100644 --- a/vendor/github.com/containernetworking/cni/pkg/invoke/args.go +++ b/vendor/github.com/containernetworking/cni/pkg/invoke/args.go @@ -57,13 +57,16 @@ func (args *Args) AsEnv() []string { pluginArgsStr = stringify(args.PluginArgs) } - env = append(env, - "CNI_COMMAND="+args.Command, - "CNI_CONTAINERID="+args.ContainerID, - "CNI_NETNS="+args.NetNS, - "CNI_ARGS="+pluginArgsStr, - "CNI_IFNAME="+args.IfName, - "CNI_PATH="+args.Path) + // Ensure that the custom values are first, so any value present in + // the process environment won't override them. + env = append([]string{ + "CNI_COMMAND=" + args.Command, + "CNI_CONTAINERID=" + args.ContainerID, + "CNI_NETNS=" + args.NetNS, + "CNI_ARGS=" + pluginArgsStr, + "CNI_IFNAME=" + args.IfName, + "CNI_PATH=" + args.Path, + }, env...) return env } diff --git a/vendor/github.com/containernetworking/cni/pkg/invoke/raw_exec.go b/vendor/github.com/containernetworking/cni/pkg/invoke/raw_exec.go index d1bd860d37e..93f1e75d9fa 100644 --- a/vendor/github.com/containernetworking/cni/pkg/invoke/raw_exec.go +++ b/vendor/github.com/containernetworking/cni/pkg/invoke/raw_exec.go @@ -50,13 +50,9 @@ func pluginErr(err error, output []byte) error { if _, ok := err.(*exec.ExitError); ok { emsg := types.Error{} if perr := json.Unmarshal(output, &emsg); perr != nil { - return fmt.Errorf("netplugin failed but error parsing its diagnostic message %q: %v", string(output), perr) + emsg.Msg = fmt.Sprintf("netplugin failed but error parsing its diagnostic message %q: %v", string(output), perr) } - details := "" - if emsg.Details != "" { - details = fmt.Sprintf("; %v", emsg.Details) - } - return fmt.Errorf("%v%v", emsg.Msg, details) + return &emsg } return err diff --git a/vendor/github.com/containernetworking/cni/pkg/types/020/types.go b/vendor/github.com/containernetworking/cni/pkg/types/020/types.go index 666cfe93e7e..2833aba787f 100644 --- a/vendor/github.com/containernetworking/cni/pkg/types/020/types.go +++ b/vendor/github.com/containernetworking/cni/pkg/types/020/types.go @@ -23,9 +23,9 @@ import ( "github.com/containernetworking/cni/pkg/types" ) -const implementedSpecVersion string = "0.2.0" +const ImplementedSpecVersion string = "0.2.0" -var SupportedVersions = []string{"", "0.1.0", implementedSpecVersion} +var SupportedVersions = []string{"", "0.1.0", ImplementedSpecVersion} // Compatibility types for CNI version 0.1.0 and 0.2.0 @@ -39,7 +39,7 @@ func NewResult(data []byte) (types.Result, error) { func GetResult(r types.Result) (*Result, error) { // We expect version 0.1.0/0.2.0 results - result020, err := r.GetAsVersion(implementedSpecVersion) + result020, err := r.GetAsVersion(ImplementedSpecVersion) if err != nil { return nil, err } @@ -52,18 +52,20 @@ func GetResult(r types.Result) (*Result, error) { // Result is what gets returned from the plugin (via stdout) to the caller type Result struct { - IP4 *IPConfig `json:"ip4,omitempty"` - IP6 *IPConfig `json:"ip6,omitempty"` - DNS types.DNS `json:"dns,omitempty"` + CNIVersion string `json:"cniVersion,omitempty"` + IP4 *IPConfig `json:"ip4,omitempty"` + IP6 *IPConfig `json:"ip6,omitempty"` + DNS types.DNS `json:"dns,omitempty"` } func (r *Result) Version() string { - return implementedSpecVersion + return ImplementedSpecVersion } func (r *Result) GetAsVersion(version string) (types.Result, error) { for _, supportedVersion := range SupportedVersions { if version == supportedVersion { + r.CNIVersion = version return r, nil } } diff --git a/vendor/github.com/containernetworking/cni/pkg/types/args.go b/vendor/github.com/containernetworking/cni/pkg/types/args.go index 66dcf9eae72..bd8640fc969 100644 --- a/vendor/github.com/containernetworking/cni/pkg/types/args.go +++ b/vendor/github.com/containernetworking/cni/pkg/types/args.go @@ -63,6 +63,12 @@ func GetKeyField(keyString string, v reflect.Value) reflect.Value { return v.Elem().FieldByName(keyString) } +// UnmarshalableArgsError is used to indicate error unmarshalling args +// from the args-string in the form "K=V;K2=V2;..." +type UnmarshalableArgsError struct { + error +} + // LoadArgs parses args from a string in the form "K=V;K2=V2;..." func LoadArgs(args string, container interface{}) error { if args == "" { @@ -85,8 +91,13 @@ func LoadArgs(args string, container interface{}) error { unknownArgs = append(unknownArgs, pair) continue } - - u := keyField.Addr().Interface().(encoding.TextUnmarshaler) + keyFieldIface := keyField.Addr().Interface() + u, ok := keyFieldIface.(encoding.TextUnmarshaler) + if !ok { + return UnmarshalableArgsError{fmt.Errorf( + "ARGS: cannot unmarshal into field '%s' - type '%s' does not implement encoding.TextUnmarshaler", + keyString, reflect.TypeOf(keyFieldIface))} + } err := u.UnmarshalText([]byte(valueString)) if err != nil { return fmt.Errorf("ARGS: error parsing value of pair %q: %v)", pair, err) diff --git a/vendor/github.com/containernetworking/cni/pkg/types/current/types.go b/vendor/github.com/containernetworking/cni/pkg/types/current/types.go index b89a5d3a073..caac92ba77c 100644 --- a/vendor/github.com/containernetworking/cni/pkg/types/current/types.go +++ b/vendor/github.com/containernetworking/cni/pkg/types/current/types.go @@ -24,9 +24,9 @@ import ( "github.com/containernetworking/cni/pkg/types/020" ) -const implementedSpecVersion string = "0.3.1" +const ImplementedSpecVersion string = "0.3.1" -var SupportedVersions = []string{"0.3.0", implementedSpecVersion} +var SupportedVersions = []string{"0.3.0", ImplementedSpecVersion} func NewResult(data []byte) (types.Result, error) { result := &Result{} @@ -37,7 +37,7 @@ func NewResult(data []byte) (types.Result, error) { } func GetResult(r types.Result) (*Result, error) { - resultCurrent, err := r.GetAsVersion(implementedSpecVersion) + resultCurrent, err := r.GetAsVersion(ImplementedSpecVersion) if err != nil { return nil, err } @@ -63,16 +63,16 @@ func convertFrom020(result types.Result) (*Result, error) { } newResult := &Result{ - DNS: oldResult.DNS, - Routes: []*types.Route{}, + CNIVersion: ImplementedSpecVersion, + DNS: oldResult.DNS, + Routes: []*types.Route{}, } if oldResult.IP4 != nil { newResult.IPs = append(newResult.IPs, &IPConfig{ - Version: "4", - Interface: -1, - Address: oldResult.IP4.IP, - Gateway: oldResult.IP4.Gateway, + Version: "4", + Address: oldResult.IP4.IP, + Gateway: oldResult.IP4.Gateway, }) for _, route := range oldResult.IP4.Routes { gw := route.GW @@ -88,10 +88,9 @@ func convertFrom020(result types.Result) (*Result, error) { if oldResult.IP6 != nil { newResult.IPs = append(newResult.IPs, &IPConfig{ - Version: "6", - Interface: -1, - Address: oldResult.IP6.IP, - Gateway: oldResult.IP6.Gateway, + Version: "6", + Address: oldResult.IP6.IP, + Gateway: oldResult.IP6.Gateway, }) for _, route := range oldResult.IP6.Routes { gw := route.GW @@ -117,6 +116,7 @@ func convertFrom030(result types.Result) (*Result, error) { if !ok { return nil, fmt.Errorf("failed to convert result") } + newResult.CNIVersion = ImplementedSpecVersion return newResult, nil } @@ -134,6 +134,7 @@ func NewResultFromResult(result types.Result) (*Result, error) { // Result is what gets returned from the plugin (via stdout) to the caller type Result struct { + CNIVersion string `json:"cniVersion,omitempty"` Interfaces []*Interface `json:"interfaces,omitempty"` IPs []*IPConfig `json:"ips,omitempty"` Routes []*types.Route `json:"routes,omitempty"` @@ -143,7 +144,8 @@ type Result struct { // Convert to the older 0.2.0 CNI spec Result type func (r *Result) convertTo020() (*types020.Result, error) { oldResult := &types020.Result{ - DNS: r.DNS, + CNIVersion: types020.ImplementedSpecVersion, + DNS: r.DNS, } for _, ip := range r.IPs { @@ -189,12 +191,13 @@ func (r *Result) convertTo020() (*types020.Result, error) { } func (r *Result) Version() string { - return implementedSpecVersion + return ImplementedSpecVersion } func (r *Result) GetAsVersion(version string) (types.Result, error) { switch version { - case "0.3.0", implementedSpecVersion: + case "0.3.0", ImplementedSpecVersion: + r.CNIVersion = version return r, nil case types020.SupportedVersions[0], types020.SupportedVersions[1], types020.SupportedVersions[2]: return r.convertTo020() @@ -244,12 +247,18 @@ func (i *Interface) String() string { return fmt.Sprintf("%+v", *i) } +// Int returns a pointer to the int value passed in. Used to +// set the IPConfig.Interface field. +func Int(v int) *int { + return &v +} + // IPConfig contains values necessary to configure an IP address on an interface type IPConfig struct { // IP version, either "4" or "6" Version string // Index into Result structs Interfaces list - Interface int + Interface *int Address net.IPNet Gateway net.IP } @@ -261,7 +270,7 @@ func (i *IPConfig) String() string { // JSON (un)marshallable types type ipConfig struct { Version string `json:"version"` - Interface int `json:"interface,omitempty"` + Interface *int `json:"interface,omitempty"` Address types.IPNet `json:"address"` Gateway net.IP `json:"gateway,omitempty"` } diff --git a/vendor/github.com/containernetworking/cni/pkg/types/types.go b/vendor/github.com/containernetworking/cni/pkg/types/types.go index 3263015afb7..6412756007e 100644 --- a/vendor/github.com/containernetworking/cni/pkg/types/types.go +++ b/vendor/github.com/containernetworking/cni/pkg/types/types.go @@ -136,7 +136,11 @@ type Error struct { } func (e *Error) Error() string { - return e.Msg + details := "" + if e.Details != "" { + details = fmt.Sprintf("; %v", e.Details) + } + return fmt.Sprintf("%v%v", e.Msg, details) } func (e *Error) Print() error { From fe0c4064e25ad4c8ff4d328818e69a4ac2b344a9 Mon Sep 17 00:00:00 2001 From: Di Xu Date: Thu, 24 Aug 2017 14:11:33 +0800 Subject: [PATCH 2/4] Remove build/cni --- build/cni/Makefile | 55 ---------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 build/cni/Makefile diff --git a/build/cni/Makefile b/build/cni/Makefile deleted file mode 100644 index 73b2c06ccb2..00000000000 --- a/build/cni/Makefile +++ /dev/null @@ -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 From dba448c2a6d13487da13f6c81b32b3009ff72402 Mon Sep 17 00:00:00 2001 From: Di Xu Date: Thu, 24 Aug 2017 14:26:53 +0800 Subject: [PATCH 3/4] Update all binary download references to v0.6.0 --- build/debian-hyperkube-base/Makefile | 8 ++++---- cluster/gce/container-linux/configure.sh | 10 +++++----- cluster/gce/gci/configure.sh | 10 +++++----- cluster/saltbase/salt/cni/init.sls | 6 +++--- test/e2e_node/remote/utils.go | 7 ++++--- 5 files changed, 21 insertions(+), 20 deletions(-) diff --git a/build/debian-hyperkube-base/Makefile b/build/debian-hyperkube-base/Makefile index f7b96f8b07e..abc9c7bad7f 100644 --- a/build/debian-hyperkube-base/Makefile +++ b/build/debian-hyperkube-base/Makefile @@ -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 diff --git a/cluster/gce/container-linux/configure.sh b/cluster/gce/container-linux/configure.sh index 9874ba0f902..6ac60cd81d2 100755 --- a/cluster/gce/container-linux/configure.sh +++ b/cluster/gce/container-linux/configure.sh @@ -110,13 +110,13 @@ function install-kube-binary-config { if [[ "${NETWORK_PROVIDER:-}" == "kubenet" ]] || \ [[ "${NETWORK_PROVIDER:-}" == "cni" ]]; then - #TODO(andyzheng0831): We should make the cni version number as a k8s env variable. - local -r cni_tar="cni-0799f5732f2a11b329d9e3d51b9c8f2e3759f2ff.tar.gz" - local -r cni_sha1="1d9788b0f5420e1a219aad2cb8681823fc515e7c" + local -r cni_version="v0.6.0" + local -r cni_tar="cni-plugins-amd64-${cni_version}.tgz" + local -r cni_sha1="d595d3ded6499a64e8dac02466e2f5f2ce257c9f" download-or-bust "${cni_sha1}" "https://storage.googleapis.com/kubernetes-release/network-plugins/${cni_tar}" local -r cni_dir="${KUBE_HOME}/cni" - mkdir -p "${cni_dir}" - tar xzf "${KUBE_HOME}/${cni_tar}" -C "${cni_dir}" --overwrite + mkdir -p "${cni_dir}/bin" + tar xzf "${KUBE_HOME}/${cni_tar}" -C "${cni_dir}/bin" --overwrite mv "${cni_dir}/bin"/* "${kube_bin}" rmdir "${cni_dir}/bin" rm -f "${KUBE_HOME}/${cni_tar}" diff --git a/cluster/gce/gci/configure.sh b/cluster/gce/gci/configure.sh index db337edcef6..2210272327d 100644 --- a/cluster/gce/gci/configure.sh +++ b/cluster/gce/gci/configure.sh @@ -170,9 +170,9 @@ function install-node-problem-detector { } function install-cni-binaries { - #TODO(andyzheng0831): We should make the cni version number as a k8s env variable. - local -r cni_tar="cni-0799f5732f2a11b329d9e3d51b9c8f2e3759f2ff.tar.gz" - local -r cni_sha1="1d9788b0f5420e1a219aad2cb8681823fc515e7c" + local -r cni_version="v0.6.0" + local -r cni_tar="cni-plugins-amd64-${cni_version}.tgz" + local -r cni_sha1="d595d3ded6499a64e8dac02466e2f5f2ce257c9f" if is-preloaded "${cni_tar}" "${cni_sha1}"; then echo "${cni_tar} is preloaded." return @@ -181,8 +181,8 @@ function install-cni-binaries { echo "Downloading cni binaries" download-or-bust "${cni_sha1}" "https://storage.googleapis.com/kubernetes-release/network-plugins/${cni_tar}" local -r cni_dir="${KUBE_HOME}/cni" - mkdir -p "${cni_dir}" - tar xzf "${KUBE_HOME}/${cni_tar}" -C "${cni_dir}" --overwrite + mkdir -p "${cni_dir}/bin" + tar xzf "${KUBE_HOME}/${cni_tar}" -C "${cni_dir}/bin" --overwrite mv "${cni_dir}/bin"/* "${KUBE_BIN}" rmdir "${cni_dir}/bin" rm -f "${KUBE_HOME}/${cni_tar}" diff --git a/cluster/saltbase/salt/cni/init.sls b/cluster/saltbase/salt/cni/init.sls index 1ffc370ab44..a1d1060d6bd 100644 --- a/cluster/saltbase/salt/cni/init.sls +++ b/cluster/saltbase/salt/cni/init.sls @@ -17,11 +17,11 @@ cni-tar: archive: - extracted - user: root - - name: /home/kubernetes + - name: /home/kubernetes/bin - makedirs: True - - source: https://storage.googleapis.com/kubernetes-release/network-plugins/cni-0799f5732f2a11b329d9e3d51b9c8f2e3759f2ff.tar.gz + - source: https://storage.googleapis.com/kubernetes-release/network-plugins/cni-plugins-amd64-v0.6.0.tgz - tar_options: v - - source_hash: md5=afbb526e7d976f98353ac96f73043031 + - source_hash: md5=9534876FAE7DBE813CDAB404DC1F9219 - archive_format: tar - if_missing: /home/kubernetes/bin diff --git a/test/e2e_node/remote/utils.go b/test/e2e_node/remote/utils.go index 8a5311c4f6b..90ec845912d 100644 --- a/test/e2e_node/remote/utils.go +++ b/test/e2e_node/remote/utils.go @@ -27,10 +27,11 @@ import ( // utils.go contains functions used across test suites. const ( - cniRelease = "0799f5732f2a11b329d9e3d51b9c8f2e3759f2ff" - cniDirectory = "cni" // The CNI tarball creates the "bin" directory under "cni". + cniVersion = "v0.6.0" + cniArch = "amd64" + cniDirectory = "cni/bin" // The CNI tarball places binaries under directory under "cni/bin". cniConfDirectory = "cni/net.d" - cniURL = "https://storage.googleapis.com/kubernetes-release/network-plugins/cni-" + cniRelease + ".tar.gz" + cniURL = "https://storage.googleapis.com/kubernetes-release/network-plugins/cni-plugins-" + cniArch + "-" + cniVersion + ".tgz" ) const cniConfig = `{ From 94b70b79da23facd02f2378cb0c07f4e10aec184 Mon Sep 17 00:00:00 2001 From: Di Xu Date: Thu, 24 Aug 2017 14:32:14 +0800 Subject: [PATCH 4/4] Update debs/rpm packages to use v0.6.0 --- build/root/WORKSPACE | 4 ++-- build/rpms/kubernetes-cni.spec | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build/root/WORKSPACE b/build/root/WORKSPACE index e66d7c05b70..fe749cc7110 100644 --- a/build/root/WORKSPACE +++ b/build/root/WORKSPACE @@ -50,8 +50,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( diff --git a/build/rpms/kubernetes-cni.spec b/build/rpms/kubernetes-cni.spec index 86dc7189dca..70627fe4dd6 100644 --- a/build/rpms/kubernetes-cni.spec +++ b/build/rpms/kubernetes-cni.spec @@ -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