Skip to content

Commit 32f6464

Browse files
Exposing controller metrics on port 8080 on all IPs, a la CAPV. (#22)
* Exposing controller metrics on port 8080 on all IPs, a la CAPV. * Reverting change to default metrics-addr: localhost only by default. If desired to make port accessible outside the pod run manager with --metrics-addr=:8080.
1 parent 5f3293f commit 32f6464

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

config/default/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ patchesStrategicMerge:
2929
- manager_image_patch_edited.yaml
3030
- manager_webhook_patch.yaml
3131
- webhookcainjection_patch.yaml
32+
- manager_prometheus_metrics_patch.yaml
3233

3334
# Protect the /metrics endpoint by putting it behind auth.
3435
# If you want your controller-manager to expose the /metrics
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# This patch enables Prometheus scraping for the manager pod.
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: controller-manager
6+
namespace: system
7+
spec:
8+
template:
9+
metadata:
10+
annotations:
11+
prometheus.io/scrape: 'true'
12+
spec:
13+
containers:
14+
# Expose the prometheus metrics on default port
15+
- name: manager
16+
ports:
17+
- containerPort: 8080
18+
name: metrics
19+
protocol: TCP

0 commit comments

Comments
 (0)