Add mapkubeapis helm plugin package

mapkubeapis helm plugin can be used to update deprecated kubernetes
apis. This plugin will be needed for system upgrade scripts dealing
with applications with deprecated kubernetes resources

TEST PLAN:
PASS: build centos
PASS: build debian

Closes-bug: 1983025
Depends-on: https://review.opendev.org/c/starlingx/tools/+/853293
Signed-off-by: Lucas Cavalcante <lucasmedeiros.cavalcante@windriver.com>
Change-Id: I1b831b5e8b49ebcd49d5e19bf91015fe81ff1e7f
This commit is contained in:
Lucas Cavalcante 2022-07-28 10:37:29 -03:00
parent 287abc01f9
commit 8072da8fab
6 changed files with 37 additions and 2 deletions

View File

@ -33,6 +33,7 @@ googletest-fdb850479284e2aae047b87df6beae84236d0135.tar.gz#googletest#https://ap
# gorilla-mux-456bcfa82d672db7cae587c9b541463f65bc2718.tar.gz#gorilla-mux#https://github.com/gorilla/mux/archive/456bcfa82d672db7cae587c9b541463f65bc2718.tar.gz#http##
helm-v3.2.1-linux-amd64.tar.gz#linux-amd64#https://get.helm.sh/helm-v3.2.1-linux-amd64.tar.gz#http##
!helm-2to3-0.10.0.tar.gz#helm-2to3-0.10.0#https://github.com/helm/helm-2to3/releases/download/v0.10.0/helm-2to3_0.10.0_linux_amd64.tar.gz#https##
!helm-mapkubeapis_0.3.0.tar.gz#helm-mapkubeapis_0.3.0#https://github.com/helm/helm-mapkubeapis/releases/download/v0.3.0/helm-mapkubeapis_0.3.0_linux_amd64.tar.gz#https##
intel-ipsec-mb-134c90c912ea9376460e9d949bb1319a83a9d839.tar.gz#intel-ipsec-mb#https://api.github.com/repos/spdk/intel-ipsec-mb/tarball/134c90c912ea9376460e9d949bb1319a83a9d839#https##
isa-l-7e1a337433a340bc0974ed0f04301bdaca374af6.tar.gz#isa-l#https://api.github.com/repos/ceph/isa-l/tarball/7e1a337433a340bc0974ed0f04301bdaca374af6#https##
isa-l_crypto-603529a4e06ac8a1662c13d6b31f122e21830352.tar.gz#isa-l_crypto#https://api.github.com/repos/01org/isa-l_crypto/tarball/603529a4e06ac8a1662c13d6b31f122e21830352#https##

View File

@ -2,7 +2,8 @@ VERSION=3.2.1
TAR_NAME=helm
TAR="$TAR_NAME-v$VERSION-linux-amd64.tar.gz"
HELM2TO3_TAR="helm-2to3-0.10.0.tar.gz"
COPY_LIST="${CGCS_BASE}/downloads/$TAR $FILES_BASE/* ${CGCS_BASE}/downloads/${HELM2TO3_TAR}"
HELMMAPKUBEAPIS_TAR="helm-mapkubeapis_0.3.0.tar.gz"
COPY_LIST="${CGCS_BASE}/downloads/$TAR $FILES_BASE/* ${CGCS_BASE}/downloads/${HELM2TO3_TAR} ${CGCS_BASE}/downloads/${HELMMAPKUBEAPIS_TAR}"
TIS_PATCH_VER=PKG_GITREVCOUNT

View File

@ -11,6 +11,7 @@ Source1: helm-upload
Source2: helm.sudo
Source3: helmv2-cli.sh
Source4: helm-2to3-0.10.0.tar.gz
Source5: helm-mapkubeapis_0.3.0.tar.gz
Requires: /bin/bash
@ -23,8 +24,10 @@ Requires: /bin/bash
# Extract helm plugins
mkdir -p ./2to3
tar zxvf %{SOURCE4} -C ./2to3
mkdir -p ./mapkubeapis
tar zxvf %{SOURCE5} -C ./mapkubeapis
# The plugin needs to be slightly adjusted
# helm-2to3 plugin needs to be slightly adjusted
mkdir -p ./2to3/bin
mv ./2to3/2to3 ./2to3/bin
@ -43,6 +46,7 @@ install -d %{buildroot}/usr/local/share/helm/plugins
# Install helm plugin 2to3
cp -R 2to3 %{buildroot}/usr/local/share/helm/plugins/
cp -R mapkubeapis %{buildroot}/usr/local/share/helm/plugins/
%files
%defattr(-,root,root,-)
@ -51,3 +55,4 @@ cp -R 2to3 %{buildroot}/usr/local/share/helm/plugins/
/usr/local/sbin/helmv2-cli
%{_sysconfdir}/sudoers.d/helm
/usr/local/share/helm/plugins/2to3/*
/usr/local/share/helm/plugins/mapkubeapis/*

View File

@ -2,3 +2,7 @@ etc/sudoers.d/helm
usr/sbin/helm
usr/local/sbin/helm-upload
usr/local/sbin/helmv2-cli
usr/local/share/helm
usr/local/share/helm/plugins
usr/local/share/helm/plugins/2to3
usr/local/share/helm/plugins/mapkubeapis

View File

@ -1,4 +1,5 @@
#!/usr/bin/make -f
# vim: set expandtab!
# export DH_VERBOSE = 1
export ROOT = debian/tmp
@ -9,12 +10,20 @@ export HELM_VERSION = 3.2.1
export HELM_EXECUTABLE = linux-amd64/helm
export HELM_PKG = helm-v$(HELM_VERSION)-linux-amd64.tar.gz
export HELM_2TO3_VERSION = 0.10.0
export HELM_2TO3_PKG = helm-2to3_$(HELM_2TO3_VERSION).tar.gz
export HELM_MAPKUBEAPIS_VERSION = 0.3.0
export HELM_MAPKUBEAPIS_PKG = helm-mapkubeapis_$(HELM_MAPKUBEAPIS_VERSION).tar.gz
%:
dh $@
override_dh_auto_build:
# Extract the third party helm package downloaded in dl_hook.
tar xfz $(HELM_PKG)
tar xfz $(HELM_2TO3_PKG)
tar xfz $(HELM_MAPKUBEAPIS_PKG)
override_dh_auto_install:
install -d -m 755 $(SBINDIR)
@ -24,6 +33,10 @@ override_dh_auto_install:
install -p -D -m 755 helmv2-cli.sh $(ROOT)/usr/local/sbin/helmv2-cli
install -d -m 755 $(SUDOERDIR)
install -p -D -m 440 helm.sudo $(SUDOERDIR)/helm
install -d -m 755 $(ROOT)/usr/local/share/helm
install -d -m 755 $(ROOT)/usr/local/share/helm/plugins
cp -R 2to3 $(ROOT)/usr/local/share/helm/plugins/
cp -R mapkubeapis $(ROOT)/usr/local/share/helm/plugins/
override_dh_usrlocal:
# Do Nothing

View File

@ -8,6 +8,17 @@ dl_files:
url: https://get.helm.sh/helm-v3.2.1-linux-amd64.tar.gz
md5sum: 98764c2c0175bd306223cc985700d619
sha256sum: 018f9908cb950701a5d59e757653a790c66d8eda288625dbb185354ca6f41f6b
helm-mapkubeapis_0.3.0.tar.gz:
topdir: mapkubeapis
url: https://github.com/helm/helm-mapkubeapis/releases/download/v0.3.0/helm-mapkubeapis_0.3.0_linux_amd64.tar.gz
md5sum: 6559501f4658af4e92e65eae0782daae
sha256sum: 2a3aa264b7ed2d7055528e9ae1ebc6ff253f4be6f1a899d32a05b8ca342a8d8c
helm-2to3_0.10.0.tar.gz:
topdir: 2to3
url: https://github.com/helm/helm-2to3/releases/download/v0.10.0/helm-2to3_0.10.0_linux_amd64.tar.gz
md5sum: 64af061b463df1657e5e842df6adfbbf
sha256sum: 0d0f5312fef60357c8363b5dbc2995375945abb7a3c53cb3bf59dfda35ef50d3
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true