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

Commit

Permalink
Adds metrics deployment options to yaml + helm chart
Browse files Browse the repository at this point in the history
Signed-off-by: JoshVanL <[email protected]>
  • Loading branch information
JoshVanL committed Jun 18, 2020
1 parent bc3508d commit e385cd9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions deploy/charts/kube-oidc-proxy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
{{- if and .Values.metrics.enabled }}
- containerPort: {{ .Values.metrics.port }}
{{ end }}
- containerPort: 443
- containerPort: 8080
readinessProbe:
Expand Down Expand Up @@ -74,6 +77,9 @@ spec:
{{- range $key, $value := .Values.extraArgs -}}
- "--{{ $key }}={{ $value -}}"
{{ end }}
{{- if and .Values.metrics.enabled }}
- "--metrics-serving-address={{ .Values.metrics.address }}:{{ .Values.metrics.port }}"
{{ end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
Expand Down
7 changes: 7 additions & 0 deletions deploy/charts/kube-oidc-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ podDisruptionBudget:
enabled: false
minAvailable: 1

# Set the Prometheus metrics listen address. Setting an empty address string
# will disable the metrics server.
metrics:
enabled: true
port: 80
address: "0.0.0.0"

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand Down
5 changes: 5 additions & 0 deletions deploy/yaml/kube-oidc-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,18 @@ spec:
metadata:
labels:
app: kube-oidc-proxy
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "80"
prometheus.io/scrape: "true"
spec:
serviceAccountName: kube-oidc-proxy
containers:
- image: quay.io/jetstack/kube-oidc-proxy:v0.3.0
ports:
- containerPort: 443
- containerPort: 8080
- containerPort: 80
readinessProbe:
httpGet:
path: /ready
Expand Down

0 comments on commit e385cd9

Please sign in to comment.