Skip to content

Commit 3f83810

Browse files
committed
Adding named ports and annotations for monitoring with Prometheus & Pyroscope
Signed-off-by: Braulio Dumba <brauliodumba@gmail.com>
1 parent 15b6491 commit 3f83810

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

.ci-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build_root_image:
22
namespace: ci
33
name: kcp-dev-build-root
4-
tag: "1.19.2"
4+
tag: "1.21.2"

config/manager/manager.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ spec:
2020
metadata:
2121
labels:
2222
app: status-controller
23+
annotations:
24+
profiles.grafana.com/cpu.port: "9282"
25+
profiles.grafana.com/cpu.scrape: "true"
26+
profiles.grafana.com/goroutine.port: "9282"
27+
profiles.grafana.com/goroutine.scrape: "true"
28+
profiles.grafana.com/memory.port: "9282"
29+
profiles.grafana.com/memory.scrape: "true"
2330
spec:
2431
securityContext:
2532
runAsNonRoot: true
@@ -55,6 +62,13 @@ spec:
5562
- name: status-controller
5663
image: controller
5764
imagePullPolicy: IfNotPresent
65+
ports:
66+
- containerPort: 9280
67+
protocol: TCP
68+
name: metrics
69+
- containerPort: 9282
70+
protocol: TCP
71+
name: debug-pprof
5872
securityContext:
5973
allowPrivilegeEscalation: false
6074
capabilities:

pkg/controller/manifests/templates/deployment.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ spec:
1414
metadata:
1515
labels:
1616
app: status-agent
17+
annotations:
18+
profiles.grafana.com/cpu.port: "8082"
19+
profiles.grafana.com/cpu.scrape: "true"
20+
profiles.grafana.com/goroutine.port: "8082"
21+
profiles.grafana.com/goroutine.scrape: "true"
22+
profiles.grafana.com/memory.port: "8082"
23+
profiles.grafana.com/memory.scrape: "true"
1724
spec:
1825
serviceAccountName: status-agent-sa
1926
{{- if .NodeSelector }}
@@ -42,6 +49,13 @@ spec:
4249
- name: status-agent
4350
image: {{ .Image }}
4451
imagePullPolicy: IfNotPresent
52+
ports:
53+
- containerPort: 8080
54+
protocol: TCP
55+
name: metrics
56+
- containerPort: 8082
57+
protocol: TCP
58+
name: debug-pprof
4559
{{- if or .HTTPProxy .HTTPSProxy}}
4660
env:
4761
{{- if .HTTPProxy }}

0 commit comments

Comments
 (0)