Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit e385cd9

Browse files
committed
Adds metrics deployment options to yaml + helm chart
Signed-off-by: JoshVanL <[email protected]>
1 parent bc3508d commit e385cd9

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

deploy/charts/kube-oidc-proxy/templates/deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ spec:
2525
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
2626
imagePullPolicy: {{ .Values.image.pullPolicy }}
2727
ports:
28+
{{- if and .Values.metrics.enabled }}
29+
- containerPort: {{ .Values.metrics.port }}
30+
{{ end }}
2831
- containerPort: 443
2932
- containerPort: 8080
3033
readinessProbe:
@@ -74,6 +77,9 @@ spec:
7477
{{- range $key, $value := .Values.extraArgs -}}
7578
- "--{{ $key }}={{ $value -}}"
7679
{{ end }}
80+
{{- if and .Values.metrics.enabled }}
81+
- "--metrics-serving-address={{ .Values.metrics.address }}:{{ .Values.metrics.port }}"
82+
{{ end }}
7783
resources:
7884
{{- toYaml .Values.resources | nindent 12 }}
7985
env:

deploy/charts/kube-oidc-proxy/values.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ podDisruptionBudget:
9696
enabled: false
9797
minAvailable: 1
9898

99+
# Set the Prometheus metrics listen address. Setting an empty address string
100+
# will disable the metrics server.
101+
metrics:
102+
enabled: true
103+
port: 80
104+
address: "0.0.0.0"
105+
99106
resources: {}
100107
# We usually recommend not to specify default resources and to leave this as a conscious
101108
# choice for the user. This also increases chances charts run on environments with little

deploy/yaml/kube-oidc-proxy.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,18 @@ spec:
2626
metadata:
2727
labels:
2828
app: kube-oidc-proxy
29+
annotations:
30+
prometheus.io/path: /metrics
31+
prometheus.io/port: "80"
32+
prometheus.io/scrape: "true"
2933
spec:
3034
serviceAccountName: kube-oidc-proxy
3135
containers:
3236
- image: quay.io/jetstack/kube-oidc-proxy:v0.3.0
3337
ports:
3438
- containerPort: 443
3539
- containerPort: 8080
40+
- containerPort: 80
3641
readinessProbe:
3742
httpGet:
3843
path: /ready

0 commit comments

Comments
 (0)