Skip to content

Commit 4385199

Browse files
authored
executors: Add new worker prometheus scrape target (#147)
This adds a scrape config for a new port exposed by the worker service that serves the collected executor metrics.
1 parent 3d94320 commit 4385199

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
annotations:
5+
prometheus.io/port: "6996"
6+
sourcegraph.prometheus/scrape: "true"
7+
{{- if .Values.worker.serviceAnnotations }}
8+
{{- toYaml .Values.worker.serviceAnnotations | nindent 4 }}
9+
{{- end }}
10+
labels:
11+
app: worker
12+
deploy: sourcegraph
13+
app.kubernetes.io/component: worker
14+
{{- if .Values.worker.serviceLabels }}
15+
{{- toYaml .Values.worker.serviceLabels | nindent 4 }}
16+
{{- end }}
17+
name: worker-executors
18+
spec:
19+
ports:
20+
- name: prom
21+
port: 6996
22+
targetPort: prom
23+
selector:
24+
{{- include "sourcegraph.selectorLabels" . | nindent 4 }}
25+
app: worker
26+
type: {{ .Values.worker.serviceType | default "ClusterIP" }}

charts/sourcegraph/templates/worker/worker.Deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ spec:
8484
name: http
8585
- containerPort: 6060
8686
name: debug
87+
- containerPort: 6996
88+
name: prom
8789
{{- if not .Values.sourcegraph.localDevMode }}
8890
resources:
8991
{{- toYaml .Values.worker.resources | nindent 10 }}

0 commit comments

Comments
 (0)