Skip to content

Commit 90eceaa

Browse files
authored
feat(helm): add option to add annotations to headless service (#4451)
1 parent d7af98f commit 90eceaa

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

operations/pyroscope/helm/pyroscope/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
| pyroscope.resources | object | `{}` | |
9090
| pyroscope.securityContext | object | `{}` | |
9191
| pyroscope.service.annotations | object | `{}` | |
92+
| pyroscope.service.headlessAnnotations | object | `{}` | |
9293
| pyroscope.service.port | int | `4040` | |
9394
| pyroscope.service.port_name | string | `"http2"` | |
9495
| pyroscope.service.scheme | string | `"HTTP"` | |

operations/pyroscope/helm/pyroscope/templates/services.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,15 @@ metadata:
5252
labels:
5353
{{- include "pyroscope.labels" . | nindent 4 }}
5454
app.kubernetes.io/component: {{ $component | quote }}
55+
{{- if or .Values.serviceMonitor.enabled $values.service.headlessAnnotations }}
56+
annotations:
5557
{{- if .Values.serviceMonitor.enabled }}
5658
prometheus.io/service-monitor: "false"
5759
{{- end }}
60+
{{- with $values.service.headlessAnnotations }}
61+
{{- toYaml . | nindent 4 }}
62+
{{- end }}
63+
{{- end }}
5864
spec:
5965
type: ClusterIP
6066
clusterIP: None

operations/pyroscope/helm/pyroscope/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ pyroscope:
8888
port_name: http2
8989
scheme: HTTP
9090
annotations: {}
91+
headlessAnnotations: {}
9192

9293
memberlist:
9394
port: 7946

operations/pyroscope/jsonnet/values.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@
444444
"securityContext": {},
445445
"service": {
446446
"annotations": {},
447+
"headlessAnnotations": {},
447448
"port": 4040,
448449
"port_name": "http2",
449450
"scheme": "HTTP",

0 commit comments

Comments
 (0)