[K8s] Differentiate match labels between headless and non-headless services
- Dominant language
- Java
- Stars
- 6.1k
- Forks
- 1.5k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 189
Description
Currently for all resources Pinot has 2 `Service` resources, a headless and non-headless respectively.
Both services are using the same helper method for the match labels:
```
metadata:
name: {{ template "pinot.broker.headless" . }}
labels:
{{- include "pinot.brokerLabels" . | nindent 4 }}
```
This leads to a duplication of metrics when trying to use Prometheus.
The solution to this is to make the labels unique, one such approach is to append the `app` label in the headless service with a suffix, i.e: `-headless`, like so:
```
labels:
app: {{ include "pinot.name" . }}-headless
chart: {{ include "pinot.chart" . }}
component: {{ .Values.broker.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
```
Contributor guide
Research direction
Start by locating the Helm templates for the headless and non-headless Service resources and the shared brokerLabels helper shown in the issue. Check how the app label is rendered for each service, then verify that the labels are unique and Prometheus no longer reports duplicated metrics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100