From d37fe03fed76399ee07a81c52d56e89d825d66f4 Mon Sep 17 00:00:00 2001 From: Daniel Safta Date: Tue, 19 Oct 2021 10:53:21 +0000 Subject: [PATCH] Add debian package for cni & isolcpus CNI was packaged in CentOS using version 0.8.1 and now it is using the stable debian version 0.9.0. Story: 2009221 Task: 43783 Signed-off-by: Daniel Safta Change-Id: Iaba754b304a26b01c048e8bc05de51ace1e88246 --- kubernetes/cni/plugins/debian/meta_data.yaml | 10 ++++++++ .../debian/deb_folder/changelog | 5 ++++ .../debian/deb_folder/control | 15 ++++++++++++ .../debian/deb_folder/copyright | 24 +++++++++++++++++++ .../debian/deb_folder/isolcpu-plugin.dirs | 2 ++ .../debian/deb_folder/isolcpu_plugin.conf | 16 +++++++++++++ .../debian/deb_folder/isolcpu_plugin.service | 14 +++++++++++ .../deb_folder/isolcpus-device-plugin.install | 3 +++ .../isolcpus-device-plugin.lintian-overrides | 2 ++ .../debian/deb_folder/rules | 13 ++++++++++ .../debian/deb_folder/source/format | 1 + .../debian/meta_data.yaml | 7 ++++++ 12 files changed, 112 insertions(+) create mode 100644 kubernetes/cni/plugins/debian/meta_data.yaml create mode 100644 kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/changelog create mode 100644 kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/control create mode 100644 kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/copyright create mode 100644 kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpu-plugin.dirs create mode 100644 kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpu_plugin.conf create mode 100644 kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpu_plugin.service create mode 100644 kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpus-device-plugin.install create mode 100644 kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpus-device-plugin.lintian-overrides create mode 100755 kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/rules create mode 100644 kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/source/format create mode 100644 kubernetes/plugins/isolcpus-device-plugin/debian/meta_data.yaml diff --git a/kubernetes/cni/plugins/debian/meta_data.yaml b/kubernetes/cni/plugins/debian/meta_data.yaml new file mode 100644 index 000000000..c3df63654 --- /dev/null +++ b/kubernetes/cni/plugins/debian/meta_data.yaml @@ -0,0 +1,10 @@ +--- +debname: golang-github-containernetworking-plugins +debver: 0.9.0-1 +dl_path: + name: golang-github-containernetworking-plugins-debian-0.9.0-1.tar.gz + url: https://salsa.debian.org/go-team/packages/golang-github-containernetworking-plugins/-/archive/debian/0.9.0-1/golang-github-containernetworking-plugins-debian-0.9.0-1.tar.gz + md5sum: 8e38d8a13f5dd5ddc17f1a1b21fd3f9d +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true diff --git a/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/changelog b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/changelog new file mode 100644 index 000000000..4835a3982 --- /dev/null +++ b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +isolcpus-device-plugin (1.0-1) unstable; urgency=medium + + * Initial release. + + -- Daniel Safta Tue, 20 Oct 2021 11:44:30 -0400 diff --git a/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/control b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/control new file mode 100644 index 000000000..e4a1cc02e --- /dev/null +++ b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/control @@ -0,0 +1,15 @@ +Source: isolcpus-device-plugin +Section: admin +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13) , + dh-golang , + golang-any +Standards-Version: 4.4.1 +Homepage: https://www.starlingx.io + +Package: isolcpus-device-plugin +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Expose isolated CPUs to Kubernetes cluster. + Expose isolated CPUs to Kubernetes as devices via the device plugin API. diff --git a/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/copyright b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/copyright new file mode 100644 index 000000000..6de917d72 --- /dev/null +++ b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/copyright @@ -0,0 +1,24 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Upstream-Name: deviceplugin +Upstream-Contact: https://github.com/intel/ +Source: https://github.com/intel/intel-device-plugins-for-kubernetes +Files: * +Copyright: (C) 2012-2018 https://github.com/intel/intel-device-plugins-for-kubernetes +License: Apache-2 + +License: Apache-2 + 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. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpu-plugin.dirs b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpu-plugin.dirs new file mode 100644 index 000000000..15899b658 --- /dev/null +++ b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpu-plugin.dirs @@ -0,0 +1,2 @@ +usr/local/sbin +etc/pmon.d diff --git a/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpu_plugin.conf b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpu_plugin.conf new file mode 100644 index 000000000..2ab1f295b --- /dev/null +++ b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpu_plugin.conf @@ -0,0 +1,16 @@ +; +; Copyright (c) 2019 Wind River Systems, Inc. +; +; SPDX-License-Identifier: Apache-2.0 +; +[process] +process = isolcpu_plugin +service = isolcpu_plugin +pidfile = /var/run/isolcpu_plugin.pid +style = lsb ; lsb +severity = major ; minor, major, critical +restarts = 3 ; restarts before error assertion +startuptime = 5 ; seconds to wait after process start +interval = 5 ; number of seconds to wait between restarts +debounce = 20 ; number of seconds to wait before degrade clear +subfunction = worker ; pmon will start monitoring once worker config is complete diff --git a/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpu_plugin.service b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpu_plugin.service new file mode 100644 index 000000000..385c0c3d3 --- /dev/null +++ b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpu_plugin.service @@ -0,0 +1,14 @@ +[Unit] +Description=Kubernetes Isolated CPU Plugin Daemon +Documentation=https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/ +After=kubelet.service +Requires=kubelet.service + +[Service] +ExecStart=/usr/local/sbin/isolcpu_plugin +ExecStartPost=/bin/bash -c 'echo $MAINPID > /var/run/isolcpu_plugin.pid' +Restart=on-failure +RestartSec=3 + +[Install] +WantedBy=multi-user.target diff --git a/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpus-device-plugin.install b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpus-device-plugin.install new file mode 100644 index 000000000..ef52af54e --- /dev/null +++ b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpus-device-plugin.install @@ -0,0 +1,3 @@ +isolcpu_plugin.service /lib/systemd/system/ +isolcpu_plugin.conf /etc/pmond.d/ +isolcpu_plugin /usr/local/sbin/ diff --git a/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpus-device-plugin.lintian-overrides b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpus-device-plugin.lintian-overrides new file mode 100644 index 000000000..184f14509 --- /dev/null +++ b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/isolcpus-device-plugin.lintian-overrides @@ -0,0 +1,2 @@ +file-in-usr-local +dir-in-usr-local diff --git a/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/rules b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/rules new file mode 100755 index 000000000..b3f466d51 --- /dev/null +++ b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_build: + go build -mod=vendor -ldflags=-linkmode=external + +override_dh_auto_test: + echo "do nothing" + +override_dh_usrlocal: + echo "do nothing" diff --git a/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/source/format b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/kubernetes/plugins/isolcpus-device-plugin/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/kubernetes/plugins/isolcpus-device-plugin/debian/meta_data.yaml b/kubernetes/plugins/isolcpus-device-plugin/debian/meta_data.yaml new file mode 100644 index 000000000..2192fad41 --- /dev/null +++ b/kubernetes/plugins/isolcpus-device-plugin/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: isolcpus-device-plugin +debver: 1.0-1 +src_path: files +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true