Files
app-node-feature-discovery/helm-charts/upstream/node-feature-discovery-helm/debian/deb_folder/patches/0001-Add-label-platform-application-to-pods.patch
Reynaldo P Gomes 2f178089fb Upgrade version (0.16.4)
This commit upgrades the application to the version 0.16.4.
It also fixes Debian changelogs to avoid warning messages during the
build.

TEST PLAN:
PASS: Build all packages generating an application tarball and check
      whether the charts' versions are correct.
PASS: Check whether application upgrade executes successfully.
PASS: Validate basic application lifecycle operations:
      upload/apply/remove/delete.
PASS: Check whether "app.starlingx.io/component" is applied to
      containers.
PASS: Validate helm override parameters are correctly applied.

Story: 2011238
Task: 51159

Change-Id: Id2836f79625cf1a3dd4d1173244bb918af09fc3f
Signed-off-by: Reynaldo P Gomes <reynaldo.patronegomes@windriver.com>
2024-10-21 14:07:32 -03:00

104 lines
3.8 KiB
Diff

From cca96235b5b37380f3b91b87b899b6ada999d800 Mon Sep 17 00:00:00 2001
From: Reynaldo P Gomes <reynaldo.patronegomes@windriver.com>
Date: Thu, 10 Oct 2024 11:46:19 -0300
Subject: [PATCH] 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: Reynaldo P Gomes <reynaldo.patronegomes@windriver.com>
---
templates/master.yaml | 2 ++
templates/nfd-gc.yaml | 2 ++
templates/topologyupdater.yaml | 2 ++
templates/worker.yaml | 2 ++
values.yaml | 2 ++
5 files changed, 10 insertions(+)
diff --git a/templates/master.yaml b/templates/master.yaml
index 162f64f4..a5eb87ad 100644
--- a/templates/master.yaml
+++ b/templates/master.yaml
@@ -22,10 +22,12 @@ spec:
metadata:
labels:
{{- include "node-feature-discovery.selectorLabels" . | nindent 8 }}
+ app.starlingx.io/component: {{ ternary "application" "platform" .Values.isApplicationLabel}}
role: master
{{- with .Values.master.annotations }}
annotations:
{{- toYaml . | nindent 8 }}
+ configchecksum: {{ toYaml .Values.isApplicationLabel | sha256sum | trunc 63 }}
{{- end }}
spec:
{{- with .Values.priorityClassName }}
diff --git a/templates/nfd-gc.yaml b/templates/nfd-gc.yaml
index 220015a3..44be2436 100644
--- a/templates/nfd-gc.yaml
+++ b/templates/nfd-gc.yaml
@@ -22,10 +22,12 @@ spec:
metadata:
labels:
{{- include "node-feature-discovery.selectorLabels" . | nindent 8 }}
+ app.starlingx.io/component: {{ ternary "application" "platform" .Values.isApplicationLabel}}
role: gc
{{- with .Values.gc.annotations }}
annotations:
{{- toYaml . | nindent 8 }}
+ configchecksum: {{ toYaml .Values.isApplicationLabel | sha256sum | trunc 63 }}
{{- end }}
spec:
serviceAccountName: {{ include "node-feature-discovery.gc.serviceAccountName" . }}
diff --git a/templates/topologyupdater.yaml b/templates/topologyupdater.yaml
index b0b36265..0af2d165 100644
--- a/templates/topologyupdater.yaml
+++ b/templates/topologyupdater.yaml
@@ -21,10 +21,12 @@ spec:
metadata:
labels:
{{- include "node-feature-discovery.selectorLabels" . | nindent 8 }}
+ app.starlingx.io/component: {{ ternary "application" "platform" .Values.isApplicationLabel}}
role: topology-updater
{{- with .Values.topologyUpdater.annotations }}
annotations:
{{- toYaml . | nindent 8 }}
+ configchecksum: {{ toYaml .Values.isApplicationLabel | sha256sum | trunc 63 }}
{{- end }}
spec:
serviceAccountName: {{ include "node-feature-discovery.topologyUpdater.serviceAccountName" . }}
diff --git a/templates/worker.yaml b/templates/worker.yaml
index fb19270d..b40ddb23 100644
--- a/templates/worker.yaml
+++ b/templates/worker.yaml
@@ -21,10 +21,12 @@ spec:
metadata:
labels:
{{- include "node-feature-discovery.selectorLabels" . | nindent 8 }}
+ app.starlingx.io/component: {{ ternary "application" "platform" .Values.isApplicationLabel}}
role: worker
{{- with .Values.worker.annotations }}
annotations:
{{- toYaml . | nindent 8 }}
+ configchecksum: {{ toYaml .Values.isApplicationLabel | sha256sum | trunc 63 }}
{{- end }}
spec:
dnsPolicy: ClusterFirstWithHostNet
diff --git a/values.yaml b/values.yaml
index 2a4106c8..bab8e008 100644
--- a/values.yaml
+++ b/values.yaml
@@ -6,6 +6,8 @@ image:
# tag
imagePullSecrets: []
+isApplicationLabel: false
+
nameOverride: ""
fullnameOverride: ""
namespaceOverride: ""
--
2.43.0