Skip to content

Commit aef5e79

Browse files
committed
feat(helm): add option to add annotations to headless service
1 parent fac6ecc commit aef5e79

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
@@ -73,6 +73,7 @@
7373
| pyroscope.resources | object | `{}` | |
7474
| pyroscope.securityContext | object | `{}` | |
7575
| pyroscope.service.annotations | object | `{}` | |
76+
| pyroscope.service.headlessAnnotations | object | `{}` | |
7677
| pyroscope.service.port | int | `4040` | |
7778
| pyroscope.service.port_name | string | `"http2"` | |
7879
| 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
@@ -37,9 +37,15 @@ metadata:
3737
labels:
3838
{{- include "pyroscope.labels" . | nindent 4 }}
3939
app.kubernetes.io/component: {{ $component | quote }}
40+
{{- if or .Values.serviceMonitor.enabled $values.service.headlessAnnotations }}
41+
annotations:
4042
{{- if .Values.serviceMonitor.enabled }}
4143
prometheus.io/service-monitor: "false"
4244
{{- end }}
45+
{{- with $values.service.headlessAnnotations }}
46+
{{- toYaml . | nindent 4 }}
47+
{{- end }}
48+
{{- end }}
4349
spec:
4450
type: ClusterIP
4551
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
@@ -141,6 +141,7 @@
141141
"securityContext": {},
142142
"service": {
143143
"annotations": {},
144+
"headlessAnnotations": {},
144145
"port": 4040,
145146
"port_name": "http2",
146147
"scheme": "HTTP",

0 commit comments

Comments
 (0)