Skip to content

Commit

Permalink
Fix Prometheus scraping for pod-identity-webhook
Browse files Browse the repository at this point in the history
The Service annotation for the pod-identity-webhook is asking Prometheus
to scrape its metrics from `https://` but this results in a HTTP 404 Not
Found response.
The pod-identity-webhook pods expose their metrics via HTTP on TCP port
9999 (the same port where the healthz checks go).
Therefore update the annotations to use `http://:9999` instead.
  • Loading branch information
jim-barber-he authored and johngmyers committed Oct 29, 2022
1 parent c5ee214 commit b0dc0b0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/port: "443"
prometheus.io/scheme: https
prometheus.io/port: "9999"
prometheus.io/scheme: http
prometheus.io/scrape: "true"
creationTimestamp: null
labels:
Expand All @@ -269,8 +269,8 @@ data:
kind: ConfigMap
metadata:
annotations:
prometheus.io/port: "443"
prometheus.io/scheme: https
prometheus.io/port: "9999"
prometheus.io/scheme: http
prometheus.io/scrape: "true"
creationTimestamp: null
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ metadata:
name: pod-identity-webhook
namespace: kube-system
annotations:
prometheus.io/port: "443"
prometheus.io/scheme: "https"
prometheus.io/port: "9999"
prometheus.io/scheme: "http"
prometheus.io/scrape: "true"
spec:
ports:
Expand All @@ -202,8 +202,8 @@ metadata:
name: pod-identity-webhook
namespace: kube-system
annotations:
prometheus.io/port: "443"
prometheus.io/scheme: "https"
prometheus.io/port: "9999"
prometheus.io/scheme: "http"
prometheus.io/scrape: "true"
data:
config: {{ PodIdentityWebhookConfigMapData }}
Expand All @@ -217,4 +217,4 @@ spec:
selector:
matchLabels:
app: pod-identity-webhook
maxUnavailable: 50%
maxUnavailable: 50%

0 comments on commit b0dc0b0

Please sign in to comment.