Skip to content

Commit

Permalink
Adding named ports and annotations for monitoring with Prometheus & P…
Browse files Browse the repository at this point in the history
…yroscope

Signed-off-by: Braulio Dumba <[email protected]>
  • Loading branch information
dumb0002 committed Sep 20, 2024
1 parent 15b6491 commit 3f83810
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build_root_image:
namespace: ci
name: kcp-dev-build-root
tag: "1.19.2"
tag: "1.21.2"
14 changes: 14 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ spec:
metadata:
labels:
app: status-controller
annotations:
profiles.grafana.com/cpu.port: "9282"
profiles.grafana.com/cpu.scrape: "true"
profiles.grafana.com/goroutine.port: "9282"
profiles.grafana.com/goroutine.scrape: "true"
profiles.grafana.com/memory.port: "9282"
profiles.grafana.com/memory.scrape: "true"
spec:
securityContext:
runAsNonRoot: true
Expand Down Expand Up @@ -55,6 +62,13 @@ spec:
- name: status-controller
image: controller
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9280
protocol: TCP
name: metrics
- containerPort: 9282
protocol: TCP
name: debug-pprof
securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down
14 changes: 14 additions & 0 deletions pkg/controller/manifests/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ spec:
metadata:
labels:
app: status-agent
annotations:
profiles.grafana.com/cpu.port: "8082"
profiles.grafana.com/cpu.scrape: "true"
profiles.grafana.com/goroutine.port: "8082"
profiles.grafana.com/goroutine.scrape: "true"
profiles.grafana.com/memory.port: "8082"
profiles.grafana.com/memory.scrape: "true"
spec:
serviceAccountName: status-agent-sa
{{- if .NodeSelector }}
Expand Down Expand Up @@ -42,6 +49,13 @@ spec:
- name: status-agent
image: {{ .Image }}
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
protocol: TCP
name: metrics
- containerPort: 8082
protocol: TCP
name: debug-pprof
{{- if or .HTTPProxy .HTTPSProxy}}
env:
{{- if .HTTPProxy }}
Expand Down

0 comments on commit 3f83810

Please sign in to comment.