metrics-server-armada-app/metrics-server-helm/files/0002-Add-label-platform-application-to-pods.patch
Erickson Silva de Oliveira f191346f95 Upgrade metrics-server to version 3.12.0/0.7.0
Upgrade metrics-server helm charts version from 3.11.0 to 3.12.0
and metrics-server image version from 0.6.4 to 0.7.0.
The new version supports k8s 1.24 - 1.29.

Furthermore, the name of the example application, which was in
the singular, and the readme, which was inconsistent, were corrected.

Test Plan:
    PASS: Build package
    PASS: App upload/apply/update/remove/delete
    PASS: Check application version
    PASS: Run sample application

Story: 2010681
Task: 49567

Change-Id: Ie592c03147b3cf40e9eeb631c18725d25460becf
Signed-off-by: Erickson Silva de Oliveira <Erickson.SilvadeOliveira@windriver.com>
2024-02-16 14:53:32 -03:00

52 lines
1.7 KiB
Diff

From 82a35a0a883f4a0d4f004af08b8b83c0cc5075d1 Mon Sep 17 00:00:00 2001
From: Erickson Silva de Oliveira <Erickson.SilvadeOliveira@windriver.com>
Date: Tue, 13 Feb 2024 09:35:43 -0300
Subject: [PATCH 2/2] Add label platform/application to pods
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 in namespace
change.
Signed-off-by: Erickson Silva de Oliveira <Erickson.SilvadeOliveira@windriver.com>
Signed-off-by: David Barbosa Bastos <David.BarbosaBastos@windriver.com>
---
templates/deployment.yaml | 2 ++
values.yaml | 1 +
2 files changed, 3 insertions(+)
diff --git a/templates/deployment.yaml b/templates/deployment.yaml
index 48cda7fe..77c1938f 100644
--- a/templates/deployment.yaml
+++ b/templates/deployment.yaml
@@ -24,12 +24,14 @@ spec:
template:
metadata:
labels:
+ app.starlingx.io/component: {{ ternary "application" "platform" .Values.isApplicationLabel}}
{{- include "metrics-server.selectorLabels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.podAnnotations }}
annotations:
+ configchecksum: {{ toYaml .Values.isApplicationLabel | sha256sum | trunc 63 }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
diff --git a/values.yaml b/values.yaml
index 54567451..2182c37f 100644
--- a/values.yaml
+++ b/values.yaml
@@ -45,6 +45,7 @@ apiService:
# The PEM encoded CA bundle for TLS verification
caBundle: ""
+isApplicationLabel: false
commonLabels: {}
podLabels: {}
podAnnotations: {}
--
2.34.1