
Add support to 'app.starlingx.io/component' to be overwritten by user override, with possible values being 'platform' and 'application'. With 'platform' being the default value. This change will also restart the pods if the label changes. Test Plan: PASS: build-pkgs -c -p metrics-server-helm/stx-metrics-server-helm PASS: upload/apply/remove/delete/update metrics-server. PASS: Install metrics-server and check if pods have the label 'app.starlingx.io/component' with the value 'platform'. PASS: Change the value of the isApplicationLabel to true using "system helm-override-update" and check, if after re-applying the app, the label 'app.starlingx.component' changes to application' in the pods. PASS: Use 'system application-apply metrics-server' when there is a change to be applied to 'app.starlingx.component' and verify if the pod is restarted. PASS: If "isApplicationLabel" is updated with a value other than true or false, the label on the pods "app.starlingx.io/component" will not change. Story: 2010612 Task: 49098 Change-Id: I9c732fface93ba426b1a1f0421aefaf8a7a10f0a Signed-off-by: David Barbosa Bastos <david.barbosabastos@windriver.com>
28 lines
651 B
Makefile
28 lines
651 B
Makefile
#!/usr/bin/make -f
|
|
# export DH_VERBOSE = 1
|
|
|
|
export METRICS_MGR_PKG="metrics-server-3.11.0.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
|
|
cd metrics-server && patch -p1 < ../0002-Add-label-platform-application-to-pods.patch
|
|
|
|
# Create the TGZ file.
|
|
make metrics-server
|
|
|
|
override_dh_auto_install:
|
|
install -d -m 755 $(APP_FOLDER)
|
|
install -p -D -m 755 *.tgz $(APP_FOLDER)
|
|
|
|
override_dh_auto_test:
|