Merge "Add debian package for k8s-pod-recovery"

This commit is contained in:
Zuul 2021-11-08 19:49:16 +00:00 committed by Gerrit Code Review
commit 4eecd1f723
13 changed files with 131 additions and 0 deletions

View File

@ -21,4 +21,5 @@ filesystem/drbd/drbd-tools
filesystem/parted
kubernetes/chartmuseum
kubernetes/helm
kubernetes/k8s-pod-recovery
storage-drivers/trident-installer

View File

@ -0,0 +1,5 @@
k8s-pod-recovery (1.0-1) unstable; urgency=medium
* Initial release
-- Mihnea Saracin <mihnea.saracin@opendev.org> Mon, 18 Oct 2021 12:51:12 +0000

View File

@ -0,0 +1,17 @@
Source: k8s-pod-recovery
Section: admin
Priority: optional
Maintainer: StarlingX Developers <StarlingX-discuss@lists.StarlingX.io>
Build-Depends: debhelper-compat (= 13)
Standards-Version: 4.4.1
Homepage: https://www.starlingx.io
Rules-Requires-Root: no
Package: k8s-pod-recovery
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends},
systemd
Description: Kubernetes Pod Recovery Service
This service will recover k8s pods that are in bad states

View File

@ -0,0 +1,22 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: k8s-pod-recovery
Source: https://opendev.org/starlingx/integ/src/branch/master/kubernetes/k8s-pod-recovery
Files: *
Copyright: (c) 2020-2021 Wind River Systems, Inc
(c) Others (See individual files for more details)
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'.

View File

@ -0,0 +1,3 @@
etc/k8s-post-recovery.d
usr/local/sbin
lib/systemd/system

View File

@ -0,0 +1,2 @@
usr/local/sbin/k8s-pod-recovery
lib/systemd/system/k8s-pod-recovery.service

View File

@ -0,0 +1,2 @@
file-in-usr-local
dir-in-usr-local

View File

@ -0,0 +1,21 @@
#!/bin/sh
# see: dh_installdeb(1)
set -e
if [ "${1}" = "configure" ] ; then
# Package upgrade: reenable in case [Install] changes and restart to pick up
# new actions
if /usr/bin/systemctl --quiet is-enabled k8s-pod-recovery.service ; then
/usr/bin/systemctl reenable k8s-pod-recovery.service > /dev/null 2>&1 || :
/usr/bin/systemctl restart k8s-pod-recovery.service > /dev/null 2>&1 || :
else
# Package install: enable and start it
/usr/bin/systemctl enable k8s-pod-recovery.service > /dev/null 2>&1 || :
/usr/bin/systemctl start k8s-pod-recovery.service > /dev/null 2>&1 || :
fi
fi
#DEBHELPER#
exit 0

View File

@ -0,0 +1,13 @@
#!/bin/sh
# see: dh_installdeb(1)
set -e
if [ "${1}" = "remove" ] || [ "${1}" = "upgrade" || [ "${1}" = "deconfigure" ]; then
/usr/bin/systemctl stop k8s-pod-recovery.service > /dev/null 2>&1 || :
/usr/bin/systemctl disable k8s-pod-recovery.service > /dev/null 2>&1 || :
fi
#DEBHELPER#
exit 0

View File

@ -0,0 +1,27 @@
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
DEBIAN_DESTDIR := $(CURDIR)/debian/tmp
%:
dh $@
override_dh_auto_test:
echo
override_dh_auto_install:
echo
override_dh_install:
install -d ${DEBIAN_DESTDIR}/etc/k8s-post-recovery.d
install -d ${DEBIAN_DESTDIR}/usr/local/sbin
install -m 755 k8s-pod-recovery ${DEBIAN_DESTDIR}/usr/local/sbin/k8s-pod-recovery
install -p -D -m 644 k8s-pod-recovery.service ${DEBIAN_DESTDIR}/lib/systemd/system/k8s-pod-recovery.service
dh_install
override_dh_usrlocal:
echo

View File

@ -0,0 +1 @@
3.0 (quilt)

View File

@ -0,0 +1,10 @@
#!/bin/bash
set -x
PKG_BUILD_NAME=$1
mkdir ${PKG_BUILD_NAME}
FILES_SRC=$MY_REPO/stx/integ/kubernetes/k8s-pod-recovery/centos/files/*
cp ${FILES_SRC} ${PKG_BUILD_NAME}

View File

@ -0,0 +1,7 @@
---
debname: k8s-pod-recovery
debver: 1.0-1
dl_hook: dl_hook
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true