From 968fa09183dc8cb604ec03e0efb82b2e9fc9eb58 Mon Sep 17 00:00:00 2001 From: Harry Date: Mon, 15 Apr 2024 09:43:02 +0800 Subject: [PATCH] [KYUUBI #6298][HELM] Make ServiceMonitor use selector labels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # :mag: Description ## Issue References ๐Ÿ”— This pull request fixes #6298 ## Describe Your Solution ๐Ÿ”ง Change matchlabels field to use template `selectorLabels` ## Types of changes :bookmark: - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan ๐Ÿงช #### Behavior Without This Pull Request :coffin: ServiceMonitor is not able to match kyuubi service #### Related Unit Tests Ran `helm template` and produced yaml files as expected --- # Checklist ๐Ÿ“ - [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #6301 from sudohainguyen/helmchart. Closes #6298 cdc669852 [Harry] Include template consistently bd82fb426 [Harry] [KYUUBI #6298][HELM] Make ServiceMonitor use selector labels to discover metric service Authored-by: Harry Signed-off-by: Cheng Pan --- charts/kyuubi/templates/kyuubi-servicemonitor.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/kyuubi/templates/kyuubi-servicemonitor.yaml b/charts/kyuubi/templates/kyuubi-servicemonitor.yaml index 937704bcc..3f0771b63 100644 --- a/charts/kyuubi/templates/kyuubi-servicemonitor.yaml +++ b/charts/kyuubi/templates/kyuubi-servicemonitor.yaml @@ -28,7 +28,7 @@ metadata: spec: selector: matchLabels: - app: {{ .Release.Name }} + {{- include "kyuubi.selectorLabels" . | nindent 6 }} endpoints: {{- toYaml .Values.serviceMonitor.endpoints | nindent 4 }} {{- end }}