Skip to content

Commit a0a1122

Browse files
committed
Fix port names, Prometheus scraping annotations, add ports where used
1 parent dfac77b commit a0a1122

39 files changed

+137
-105
lines changed

charts/sourcegraph-executor/dind/templates/executor/executor.Deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,20 @@ spec:
5151
livenessProbe:
5252
httpGet:
5353
path: /healthz
54-
port: debug
54+
port: http-debug
5555
scheme: HTTP
5656
initialDelaySeconds: 60
5757
timeoutSeconds: 5
5858
readinessProbe:
5959
httpGet:
6060
path: /ready
61-
port: debug
61+
port: http-debug
6262
scheme: HTTP
6363
periodSeconds: 5
6464
timeoutSeconds: 5
6565
ports:
66-
- containerPort: 6060
67-
name: debug
66+
- name: http-debug
67+
containerPort: 6060
6868
terminationMessagePolicy: FallbackToLogsOnError
6969
env:
7070
{{- range $name, $item := .Values.executor.env }}

charts/sourcegraph-executor/dind/templates/executor/executor.Service.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ metadata:
1616
name: executor
1717
spec:
1818
ports:
19-
- name: debug
19+
- name: http-debug
2020
port: 6060
21-
targetPort: debug
21+
targetPort: http-debug
2222
selector:
2323
{{- include "sourcegraph.selectorLabels" . | nindent 4 }}
2424
app: {{include "executor.name" . }}

charts/sourcegraph-executor/dind/templates/private-docker-registry/private-docker-registry.Deployment.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,19 @@ spec:
4747
- name: REGISTRY_PROXY_REMOTEURL
4848
value: http://registry-1.docker.io
4949
ports:
50-
- name: http-registry
50+
- name: http
5151
containerPort: 5000
5252
livenessProbe:
5353
httpGet:
5454
path: /
55-
port: http-registry
55+
port: http
5656
scheme: HTTP
5757
initialDelaySeconds: 5
5858
timeoutSeconds: 5
5959
readinessProbe:
6060
httpGet:
6161
path: /
62-
port: http-registry
62+
port: http
6363
scheme: HTTP
6464
periodSeconds: 5
6565
timeoutSeconds: 5

charts/sourcegraph-executor/dind/templates/private-docker-registry/private-docker-registry.Service.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ metadata:
1313
name: private-docker-registry
1414
spec:
1515
ports:
16-
- name: http-registry
16+
- name: http
1717
port: 5000
1818
protocol: TCP
19-
targetPort: http-registry
19+
targetPort: http
2020
selector:
2121
app: private-docker-registry
2222
type: ClusterIP

charts/sourcegraph-executor/k8s/templates/executor.Deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ spec:
5555
securityContext:
5656
privileged: {{ .Values.executor.securityContext.privileged }}
5757
ports:
58-
- containerPort: 6060
59-
name: debug
58+
- name: http-debug
59+
containerPort: 6060
6060
envFrom:
6161
- configMapRef:
6262
name: {{ include "executor.name" . }}

charts/sourcegraph-executor/k8s/templates/executor.Service.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ metadata:
1313
name: {{ include "executor.name" . }}
1414
spec:
1515
ports:
16-
- name: debug
16+
- name: http-debug
1717
port: 6060
18-
targetPort: debug
18+
targetPort: http-debug
1919
selector:
2020
{{- include "sourcegraph.selectorLabels" . | nindent 4 }}
2121
app: {{ include "executor.name" . }}

charts/sourcegraph/templates/_worker.tpl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{- define "sourcegraph.worker" -}}
22
{{- $top := index . 0 }}
33
{{- $suffix := index . 1 -}}
4-
{{- $allowlist := index . 2 -}}
4+
{{- $allowlist := index . 2 -}}
55
{{- $blocklist := index . 3 -}}
66
{{- $resources := index . 4 -}}
77

@@ -100,24 +100,24 @@ spec:
100100
livenessProbe:
101101
httpGet:
102102
path: /healthz
103-
port: debug
103+
port: http-debug
104104
scheme: HTTP
105105
initialDelaySeconds: 60
106106
timeoutSeconds: 5
107107
readinessProbe:
108108
httpGet:
109109
path: /ready
110-
port: debug
110+
port: http-debug
111111
scheme: HTTP
112112
periodSeconds: 5
113113
timeoutSeconds: 5
114114
ports:
115-
- containerPort: 3189
116-
name: http
117-
- containerPort: 6060
118-
name: debug
119-
- containerPort: 6996
120-
name: prom
115+
- name: http
116+
containerPort: 3189
117+
- name: http-debug
118+
containerPort: 6060
119+
- name: http-debug-exec
120+
containerPort: 6996
121121
{{- if not $top.Values.sourcegraph.localDevMode }}
122122
resources:
123123
{{- toYaml $resources | nindent 10 }}

charts/sourcegraph/templates/cadvisor/cadvisor.DaemonSet.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ spec:
2222
metadata:
2323
annotations:
2424
description: Collects and exports container metrics.
25+
kubectl.kubernetes.io/default-container: cadvisor
2526
prometheus.io/port: "48080"
2627
sourcegraph.prometheus/scrape: "true"
27-
kubectl.kubernetes.io/default-container: cadvisor
2828
{{- if .Values.sourcegraph.podAnnotations }}
2929
{{- toYaml .Values.sourcegraph.podAnnotations | nindent 8 }}
3030
{{- end }}

charts/sourcegraph/templates/codeinsights-db/codeinsights-db.Service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ metadata:
1818
name: codeinsights-db
1919
spec:
2020
ports:
21+
- name: http-metrics
22+
port: 9187
23+
targetPort: http-metrics
2124
- name: codeinsights-db
2225
port: 5432
2326
targetPort: codeinsights-db

charts/sourcegraph/templates/codeinsights-db/codeinsights-db.StatefulSet.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ spec:
7979
value: "/conf"
8080
terminationMessagePolicy: FallbackToLogsOnError
8181
ports:
82-
- containerPort: 5432
83-
name: codeinsights-db
82+
- name: codeinsights-db
83+
containerPort: 5432
8484
{{- if not .Values.sourcegraph.localDevMode }}
8585
resources:
8686
{{- toYaml .Values.codeInsightsDB.resources | nindent 10 }}
@@ -97,7 +97,8 @@ spec:
9797
{{- if .Values.codeInsightsDB.extraVolumeMounts }}
9898
{{- toYaml .Values.codeInsightsDB.extraVolumeMounts | nindent 8 }}
9999
{{- end }}
100-
- env:
100+
- name: pgsql-exporter
101+
env:
101102
{{- include "sourcegraph.dataSource" (list . "codeInsightsDB" ) | nindent 8 }}
102103
{{- range $name, $item := .Values.codeInsightsDB.postgresExporter.env}}
103104
- name: {{ $name }}
@@ -106,14 +107,16 @@ spec:
106107
- name: PG_EXPORTER_EXTEND_QUERY_PATH
107108
value: /config/code_insights_queries.yaml
108109
image: {{ include "sourcegraph.image" (list . "postgresExporter") }}
109-
terminationMessagePolicy: FallbackToLogsOnError
110-
name: pgsql-exporter
110+
ports:
111+
- name: http-metrics
112+
containerPort: 9187
111113
{{- if not .Values.sourcegraph.localDevMode }}
112114
resources:
113115
{{- toYaml .Values.postgresExporter.resources | nindent 10 }}
114116
{{- end }}
115117
securityContext:
116118
{{- toYaml .Values.postgresExporter.containerSecurityContext | nindent 10 }}
119+
terminationMessagePolicy: FallbackToLogsOnError
117120
{{- if .Values.codeInsightsDB.extraContainers }}
118121
{{- toYaml .Values.codeInsightsDB.extraContainers | nindent 6 }}
119122
{{- end }}

0 commit comments

Comments
 (0)