From 0005b1aa019b1ac9195fa56a1353ece0f13d933a Mon Sep 17 00:00:00 2001 From: Kris686 Date: Fri, 19 Apr 2024 15:46:33 +0200 Subject: [PATCH] prometheus monitoring fix - missing label (#519) ### Issue description Pulumi kubernetes operator creates Service and ServiceMonitor objects for metrics by itself: https://github.com/pulumi/pulumi-kubernetes-operator/blob/7d9e693bc6e27f1e3881ce350cdf7fbde71b26be/cmd/manager/main.go#L186C31-L186C31 Service created for metrics requires name label added on pods. ### Proposed changes Added "name" label with {{ template "pulumi-kubernetes-operator.name" . }} value to pulumi-kubernetes-operator Deployment at ReplicaSet level. impact/no-changelog-required --------- Co-authored-by: krzysztofer Co-authored-by: Engin Diri --- deploy/helm/pulumi-operator/Chart.yaml | 5 +++-- deploy/helm/pulumi-operator/templates/deployment.yaml | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/deploy/helm/pulumi-operator/Chart.yaml b/deploy/helm/pulumi-operator/Chart.yaml index 84875162..5f869aee 100755 --- a/deploy/helm/pulumi-operator/Chart.yaml +++ b/deploy/helm/pulumi-operator/Chart.yaml @@ -9,7 +9,8 @@ icon: https://www.pulumi.com/logos/brand/avatar-on-white.svg type: application -version: 0.7.2 + +version: 0.7.3 appVersion: 1.14.0 keywords: @@ -25,7 +26,7 @@ maintainers: annotations: artifacthub.io/containsSecurityUpdates: "false" artifacthub.io/changes: | - - Fix type in CRD + - Added "name" label with pulumi-kubernetes-operator.name value to pulumi-kubernetes-operator Deployment at ReplicaSet level. (#519) artifacthub.io/images: | - name: pulumi-kubernetes-operator image: docker.io/pulumi-kubernetes-operator:v1.14.0 diff --git a/deploy/helm/pulumi-operator/templates/deployment.yaml b/deploy/helm/pulumi-operator/templates/deployment.yaml index 5c041b49..4a9bd9f4 100644 --- a/deploy/helm/pulumi-operator/templates/deployment.yaml +++ b/deploy/helm/pulumi-operator/templates/deployment.yaml @@ -24,6 +24,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: + name: {{ template "pulumi-kubernetes-operator.name" . }} app: {{ template "pulumi-kubernetes-operator.name" . }} release: {{ .Release.Name }} {{- include "pulumi-kubernetes-operator.selectorLabels" . | nindent 8 }}