
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
58 lines
1.2 KiB
RPMSpec
58 lines
1.2 KiB
RPMSpec
# Build variables
|
|
%global helm_folder /usr/lib/helm
|
|
|
|
%global sha e67ee73cfc51e27eaf46b2af0ae8debd16c86d26
|
|
|
|
Summary: Metrics-server helm chart
|
|
Name: metrics-server-helm
|
|
Version: 1.0
|
|
Release: %{tis_patch_ver}%{?_tis_dist}
|
|
License: Apache-2.0
|
|
Group: base
|
|
Packager: Wind River <info@windriver.com>
|
|
URL: https://github.com/kubernetes-sigs/metrics-server#installation
|
|
|
|
Source0: metrics-server-%{sha}.tgz
|
|
Source1: repositories.yaml
|
|
Source2: index.yaml
|
|
Source3: Makefile
|
|
|
|
BuildArch: noarch
|
|
|
|
Patch01: 0001-Add-sample-app-to-metrics-server.patch
|
|
|
|
BuildRequires: helm
|
|
BuildRequires: chartmuseum
|
|
|
|
%description
|
|
StarlingX Metrics-Server Helm Charts
|
|
|
|
%prep
|
|
%setup -n metrics-server
|
|
|
|
%patch01 -p1
|
|
|
|
%build
|
|
# Host a server for the charts
|
|
chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="." &
|
|
sleep 2
|
|
helm repo add local http://localhost:8879/charts
|
|
|
|
# Create the tgz file
|
|
cd ../
|
|
cp %{SOURCE3} ./
|
|
make metrics-server
|
|
|
|
# terminate helm server (the last backgrounded task)
|
|
kill %1
|
|
|
|
%install
|
|
cd ../
|
|
install -d -m 755 ${RPM_BUILD_ROOT}%{helm_folder}
|
|
install -p -D -m 755 *.tgz ${RPM_BUILD_ROOT}%{helm_folder}
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%{helm_folder}/*
|
|
|