From 19c0f0a4944b09535d68048ca6a296bbdabb6372 Mon Sep 17 00:00:00 2001 From: Madison Grubb Date: Thu, 27 Jun 2024 17:46:00 -0400 Subject: [PATCH 1/3] add global common labels. don't check for loadbalancer service type since it is implied. --- charts/netobserv/templates/_helpers.tpl | 3 +++ charts/netobserv/templates/service.yaml | 2 +- charts/netobserv/values.yaml | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/netobserv/templates/_helpers.tpl b/charts/netobserv/templates/_helpers.tpl index 0b2a7a8..4a0bf42 100644 --- a/charts/netobserv/templates/_helpers.tpl +++ b/charts/netobserv/templates/_helpers.tpl @@ -40,6 +40,9 @@ helm.sh/chart: {{ include "netobserv.chart" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- if .Values.commonLabels }} +{{ toYaml .Values.commonLabels }} +{{- end }} {{- end }} {{/* diff --git a/charts/netobserv/templates/service.yaml b/charts/netobserv/templates/service.yaml index 1fb7a49..8c0e860 100644 --- a/charts/netobserv/templates/service.yaml +++ b/charts/netobserv/templates/service.yaml @@ -7,7 +7,7 @@ metadata: annotations: {{ .Values.service.annotations | toYaml | nindent 4 }} spec: type: {{ .Values.service.type }} - {{- if and (eq .Values.service.type "LoadBalancer") .Values.service.externalTrafficPolicy }} + {{- if .Values.service.externalTrafficPolicy }} externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }} {{- end }} ports: {{ .Values.service.ports | toYaml | nindent 4 }} diff --git a/charts/netobserv/values.yaml b/charts/netobserv/values.yaml index 87c1069..f413085 100644 --- a/charts/netobserv/values.yaml +++ b/charts/netobserv/values.yaml @@ -142,6 +142,9 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: "" +# global common labels, applied to all ressources +commonLabels: {} + podAnnotations: {} podLabels: {} From 5da4160aab8795e6823015d0aed8784163f14b76 Mon Sep 17 00:00:00 2001 From: Madison Grubb Date: Thu, 27 Jun 2024 17:46:17 -0400 Subject: [PATCH 2/3] bump patch version --- charts/netobserv/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/netobserv/Chart.yaml b/charts/netobserv/Chart.yaml index 67e47be..e2b6361 100644 --- a/charts/netobserv/Chart.yaml +++ b/charts/netobserv/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: netobserv description: ElastiFlow NetObserv type: application -version: 0.1.1 +version: 0.3.1 appVersion: 7.0.1 keywords: From d931a71fc2954c3a34eab02c8ada4a7b4ee5d9cf Mon Sep 17 00:00:00 2001 From: "Keli (Madison) Grubb" Date: Tue, 2 Jul 2024 11:00:02 -0400 Subject: [PATCH 3/3] Update charts/netobserv/templates/_helpers.tpl Co-authored-by: Mack (Maksym Iv) <146473578+maksym-iv-elf@users.noreply.github.com> --- charts/netobserv/templates/_helpers.tpl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/netobserv/templates/_helpers.tpl b/charts/netobserv/templates/_helpers.tpl index f0b3629..c66d955 100644 --- a/charts/netobserv/templates/_helpers.tpl +++ b/charts/netobserv/templates/_helpers.tpl @@ -40,8 +40,9 @@ helm.sh/chart: {{ include "netobserv.chart" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- if .Values.commonLabels }} -{{ toYaml .Values.commonLabels }} +{{ include "netobserv.selectorLabels" . }} +{{- range $k, $v := .Values.commonLabels }} +{{ $k }}: {{ $v | quote }} {{- end }} {{- end }}