Fixing metrics-server on Centos and Debian
A previous patch had wrong values to download images. Fixed the patch. Metrics-server-helm on debian wasn't working, it was fixed and metrics-server-helm was added as a dependency for stx-metrics-server-helm. TEST PLAN CENTOS: PASS Build-pkgs centos PASS Build-iso centos PASS Apply application centos PASS Remove application centos TEST PLAN DEBIAN: PASS Build-pkgs debian PASS Build-iso debian PASS Apply application debian PASS Remove application debian Closes-bug: 1979586 Signed-off-by: Luiz Felipe Kina <LuizFelipe.EiskeKina@windriver.com> Signed-off-by: Felipe Sanches Zanoni <Felipe.SanchesZanoni@windriver.com> Change-Id: I988a5032d7d3fc8769ed6c502d37cfc3493ea282
This commit is contained in:
parent
6b5689fddf
commit
6b839fdc28
@ -19,7 +19,7 @@ Source3: Makefile
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
Patch01: 0001-PATCH-Add-sample-app-to-metrics-server.patch
|
||||
Patch01: 0001-Add-sample-app-to-metrics-server.patch
|
||||
|
||||
BuildRequires: helm
|
||||
BuildRequires: chartmuseum
|
||||
|
@ -2,4 +2,4 @@ metrics-server-helm (1.0) unstable; urgency=medium
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Luiz Felipe Kina <LuizFelipe.EiskeKina@windriver.com> Thu, 24 Mar 2022 17:50: +0000
|
||||
-- Luiz Felipe Kina <LuizFelipe.EiskeKina@windriver.com> Thu, 24 Mar 2022 17:50: +0000
|
||||
|
@ -0,0 +1 @@
|
||||
usr/lib/helm/*
|
@ -1,25 +1,35 @@
|
||||
#!/usr/bin/make -f
|
||||
# export DH_VERBOSE = 1
|
||||
|
||||
export ROOT = debian/tmp
|
||||
export METRICS_MGR_PKG="metrics-server-3.8.2.tgz"
|
||||
export HELM_FOLDER=/usr/lib/helm
|
||||
export ROOT=debian/tmp
|
||||
export APP_FOLDER=$(ROOT)$(HELM_FOLDER)
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_build:
|
||||
# Unpack metrics-server source
|
||||
tar xzf $(METRICS_MGR_PKG)
|
||||
|
||||
# Apply patch to code
|
||||
cd metrics-server && patch -p1 < ../0001-Add-sample-app-to-metrics-server.patch
|
||||
|
||||
# Host a server for the helm charts.
|
||||
chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" \
|
||||
--storage-local-rootdir="." &
|
||||
|
||||
sleep 2
|
||||
# Copy Chart yaml file to build folder
|
||||
cp metrics-server/Chart.yaml debian/Chart.yaml
|
||||
|
||||
# Create the TGZ file.
|
||||
make
|
||||
make metrics-server
|
||||
|
||||
# Terminate the helm chart server.
|
||||
pkill chartmuseum
|
||||
|
||||
override_dh_auto_install:
|
||||
install -d -m 755 $(APP_FOLDER)
|
||||
install -p -D -m 755 *.tgz $(APP_FOLDER)
|
||||
|
||||
override_dh_auto_test:
|
||||
|
@ -1,8 +1,9 @@
|
||||
From 2df39de8e32eccc76fe62b97eaf0bc5debc58023 Mon Sep 17 00:00:00 2001
|
||||
From: Delfino Curado <delfinogomes.curadofilho@windriver.com>
|
||||
Date: Thu, 3 Mar 2022 10:36:48 -0300
|
||||
Subject: [PATCH] [PATCH] Add sample app to metrics-server
|
||||
From eb8e6805914d912be374eb86731a88c3936b91b8 Mon Sep 17 00:00:00 2001
|
||||
From: Luiz Felipe Kina <LuizFelipe.EiskeKina@windriver.com>
|
||||
Date: Wed, 22 Jun 2022 22:08:25 -0400
|
||||
Subject: [PATCH] Add sample app to metrics-server
|
||||
|
||||
Signed-off-by: Luiz Felipe Kina <LuizFelipe.EiskeKina@windriver.com>
|
||||
---
|
||||
templates/sample-app-cluster-role-binding.yml | 16 ++++++++++++
|
||||
templates/sample-app-cluster-role.yml | 17 +++++++++++++
|
||||
@ -124,7 +125,7 @@ index 0000000..5e116c0
|
||||
+{{- end }}
|
||||
\ No newline at end of file
|
||||
diff --git a/values.yaml b/values.yaml
|
||||
index 6a97505..7f40309 100644
|
||||
index 6a97505..5167d25 100644
|
||||
--- a/values.yaml
|
||||
+++ b/values.yaml
|
||||
@@ -128,3 +128,12 @@ nodeSelector: {}
|
||||
@ -138,8 +139,8 @@ index 6a97505..7f40309 100644
|
||||
+ create: false
|
||||
+ image:
|
||||
+ repository: docker.io/starlingx/stx-metrics-server-sample-app
|
||||
+ tag: master-centos-stable-latest
|
||||
+ tag: stx.7.0-v1.0.0
|
||||
+
|
||||
--
|
||||
2.17.1
|
||||
2.29.2
|
||||
|
@ -5,7 +5,8 @@ Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
|
||||
Build-Depends: debhelper-compat (= 13),
|
||||
chartmuseum,
|
||||
helm,
|
||||
procps
|
||||
procps,
|
||||
metrics-server-helm
|
||||
Standards-Version: 4.5.1
|
||||
Homepage: https://www.starlingx.io
|
||||
|
||||
|
@ -15,6 +15,7 @@ export APP_TARBALL_FLUXCD = $(APP_NAME)-$(APP_VERSION).tgz
|
||||
export HELM_REPO = stx-platform
|
||||
export STAGING_ARMADA = staging-armada
|
||||
export STAGING_FLUXCD = staging-fluxcd
|
||||
export HELM_FOLDER = /usr/lib/helm
|
||||
|
||||
%:
|
||||
dh $@
|
||||
@ -42,6 +43,7 @@ override_dh_auto_build:
|
||||
cp manifests/metrics-server_manifest.yaml $(STAGING_ARMADA)
|
||||
mkdir -p $(STAGING_ARMADA)/charts
|
||||
cp helm-charts/*.tgz $(STAGING_ARMADA)/charts
|
||||
cp $(HELM_FOLDER)/metrics*.tgz $(STAGING_ARMADA)/charts
|
||||
|
||||
# Populate metadata.
|
||||
sed -i 's/@APP_NAME@/$(APP_NAME)/g' $(STAGING_ARMADA)/metadata.yaml
|
||||
@ -64,6 +66,7 @@ override_dh_auto_build:
|
||||
cp -Rv fluxcd-manifests $(STAGING_FLUXCD)
|
||||
mkdir -p $(STAGING_FLUXCD)/charts
|
||||
cp helm-charts/*.tgz $(STAGING_FLUXCD)/charts
|
||||
cp $(HELM_FOLDER)/metrics*.tgz $(STAGING_FLUXCD)/charts
|
||||
|
||||
# Populate metadata.
|
||||
sed -i 's/@APP_NAME@/$(APP_NAME)/g' $(STAGING_FLUXCD)/metadata.yaml
|
||||
|
Loading…
Reference in New Issue
Block a user