metrics-server-armada-app/helm-charts/upstream/metrics-server-helm/debian/deb_folder/patches/0002-Add-label-platform-application-to-pods.patch
Erickson Silva de Oliveira b2aeb9752f Auto-increment chart versions
Enable auto-versioning of helm charts to ensure the FluxCD
helm controller recognizes chart changes.

Test Plan:
PASS: Build all packages generating an application tarball verifying
      all versions on the charts and application make sense.
PASS: Introduce temporary chart changes and ensure that the versions
      increment as expected.
PASS: Validate basic application lifecycle operations:
      upload/apply/remove/delete.

Story: 2010929
Task: 49874

Change-Id: Id6aa5f4932356be2aa4ec5e577fa6bf5106610ab
Signed-off-by: Erickson Silva de Oliveira <Erickson.SilvadeOliveira@windriver.com>
2024-04-24 09:09:54 -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