[KYUUBI #6298][HELM] Make ServiceMonitor use selector labels

# 🔍 Description
## Issue References 🔗

This pull request fixes #6298

## Describe Your Solution 🔧

Change matchlabels field to use template `selectorLabels`

## Types of changes 🔖

- [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 ⚰️

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 <quanghai.ng1512@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
This commit is contained in:
Harry 2024-04-15 09:43:02 +08:00 committed by Cheng Pan
parent 37bf244236
commit 968fa09183
No known key found for this signature in database
GPG Key ID: 8001952629BCC75D

View File

@ -28,7 +28,7 @@ metadata:
spec:
selector:
matchLabels:
app: {{ .Release.Name }}
{{- include "kyuubi.selectorLabels" . | nindent 6 }}
endpoints:
{{- toYaml .Values.serviceMonitor.endpoints | nindent 4 }}
{{- end }}