From 4d3b9f2cf04ee08832707b248f1304194ffe74d4 Mon Sep 17 00:00:00 2001 From: Rodrigo Souza Date: Sat, 25 May 2024 00:22:49 -0300 Subject: [PATCH] Update service.yaml The fields in the selector within the services are getting duplicated when generated, and this is causing issues in FluxCD v2. Example error: Helm install failed for release trivy-report-operator/trivy-dojo-operator with chart trivy-dojo-report-operator@0.6.1: error while running post render on files: map[string]interface {}(nil): yaml: unmarshal errors: line 20: mapping key "app.kubernetes.io/instance" already defined at line 17 line 19: mapping key "app.kubernetes.io/name" already defined at line 18 --- charts/templates/service.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/charts/templates/service.yaml b/charts/templates/service.yaml index 7af6a18..7ffb55f 100644 --- a/charts/templates/service.yaml +++ b/charts/templates/service.yaml @@ -7,8 +7,6 @@ metadata: spec: type: {{ .Values.operator.type }} selector: - app.kubernetes.io/instance: trivy-dojo-report-operator - app.kubernetes.io/name: trivy-dojo-report-operator {{- include "charts.selectorLabels" . | nindent 4 }} ports: - {{- .Values.operator.ports | toYaml | nindent 2 -}} \ No newline at end of file + {{- .Values.operator.ports | toYaml | nindent 2 -}}