Merge "Add bond-cni container network plugin"

This commit is contained in:
Zuul 2022-02-03 18:20:52 +00:00 committed by Gerrit Code Review
commit 73b428d72f
5 changed files with 83 additions and 0 deletions

View File

@ -175,6 +175,7 @@ containerd
k8s-pod-recovery
k8s-cni-cache-cleanup
containernetworking-plugins
bond-cni
# resource-agents
resource-agents

View File

@ -54,6 +54,7 @@ security/tboot
docker/python-docker
kubernetes/containerd
kubernetes/cni/plugins
kubernetes/cni/bond-cni
kubernetes/kubernetes-1.18.1
kubernetes/kubernetes-1.19.13
kubernetes/kubernetes-1.20.9

View File

@ -90,3 +90,4 @@ inih-b1dbff4b0bd1e1f40d237e21011f6dee0ec2fa69.tar.gz#inih-44#https://github.com/
pf-bb-config-d7d5f1ddd17b4c80e3e0d6ce87660926f58f8585.tar.gz#pf-bb-config-21.6#https://github.com/intel/pf-bb-config/tarball/d7d5f1ddd17b4c80e3e0d6ce87660926f58f8585#https##
gpu-operator-1.8.1.tar.gz#gpu-operator-1.8.1#https://github.com/NVIDIA/gpu-operator/archive/v1.8.1.tar.gz##https##
containernetworking-plugins-v0.9.1.tar.gz#containernetworking-plugins-v0.9.1#https://github.com/containernetworking/plugins/archive/refs/tags/v0.9.1.tar.gz#https##
bond-cni-bff6422d7089d988dc1548e6abe0543601f6e1c7.tar.gz#bond-cni-bff6422d7089d988dc1548e6abe0543601f6e1c7#https://api.github.com/repos/k8snetworkplumbingwg/bond-cni/tarball/bff6422d7089d988dc1548e6abe0543601f6e1c7#https##

View File

@ -0,0 +1,73 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2020 Wind River Systems, Inc.
#
# Use the same build parameters as the other CNI plugins from containernetworking-plugins
%if ! 0%{?gobuild:1}
%define gobuild(o:) go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v -x %{?**};
%endif
%global provider github
%global provider_tld com
%global project k8snetworkplumbingwg
%global repo bond-cni
# https://github.com/k8snetworkplumbingwg/bond-cni
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%global import_path %{provider_prefix}
%global commit bff6422d7089d988dc1548e6abe0543601f6e1c7
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: bond-cni
Version: 1.0
Release: %{shortcommit}%{?_tis_dist}.%{tis_patch_ver}
Summary: Bond CNI network plugin
License: ASL 2.0
URL: https://%{provider_prefix}
Source0: %{repo}-%{commit}.tar.gz
ExclusiveArch: aarch64 %{arm} ppc64le s390x x86_64 %{ix86}
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang >= 1.13}
Provides: bond-cni = %{version}-%{release}
%description
The Bond-CNI concerns itself only with providing network connectivity via
bonding of containers and removing any allocated resources when the container
is deleted.
%prep
%autosetup -n %{repo}-%{commit}
%build
export ORG_PATH="%{provider}.%{provider_tld}/%{project}"
export REPO_PATH="$ORG_PATH/%{repo}"
if [ ! -h gopath/src/${REPO_PATH} ]; then
mkdir -p gopath/src/${ORG_PATH}
ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255
fi
export GOPATH=$(pwd)/gopath
mkdir -p $(pwd)/bin
echo "Building bond-cni plugin"
%gobuild -o "${PWD}/bin/bond" "${PWD}/bond/"
%install
install -d -p %{buildroot}%{_libexecdir}/cni/
install -p -m 0755 bin/* %{buildroot}/%{_libexecdir}/cni
#define license tag if not already defined
%{!?_licensedir:%global license %doc}
%files
%license LICENSE
%doc *.md
%dir %{_libexecdir}/cni
%{_libexecdir}/cni/*
%changelog
* Fri Jan 21 2022 Steven Webster <steven.webster@windriver.com>
- Initial package, based on v1.0 + 14 additional commits.

View File

@ -0,0 +1,7 @@
VERSION=bff6422d7089d988dc1548e6abe0543601f6e1c7
TAR_NAME=bond-cni
TAR="${TAR_NAME}-${VERSION}.tar.gz"
COPY_LIST="${CGCS_BASE}/downloads/${TAR}"
TIS_PATCH_VER=PKG_GITREVCOUNT