Skip to content

Commit

Permalink
fixup! ksm: add liveness and readiness probes
Browse files Browse the repository at this point in the history
  • Loading branch information
rexagod committed Jul 22, 2024
1 parent 2e35d00 commit 76e8331
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions assets/kube-state-metrics/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
image: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.12.0
livenessProbe:
httpGet:
path: livez
path: /livez
port: main
scheme: HTTPS
name: kube-state-metrics
Expand All @@ -70,7 +70,7 @@ spec:
name: self
readinessProbe:
httpGet:
path: metrics
path: /readyz
port: self
scheme: HTTPS
resources:
Expand Down Expand Up @@ -124,7 +124,7 @@ spec:
- --tls-private-key-file=/etc/tls/private/tls.key
- --client-ca-file=/etc/tls/client/client-ca.crt
- --config-file=/etc/kube-rbac-policy/config.yaml
- --ignore-paths=/metrics
- --ignore-paths=/readyz
image: quay.io/brancz/kube-rbac-proxy:v0.17.1
name: kube-rbac-proxy-self
ports:
Expand Down
6 changes: 3 additions & 3 deletions jsonnet/components/kube-state-metrics.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ function(params)
'--tls-private-key-file=/etc/tls/private/tls.key',
'--client-ca-file=/etc/tls/client/client-ca.crt',
'--config-file=/etc/kube-rbac-policy/config.yaml',
'--ignore-paths=' + std.join(',', if std.endsWith(c.name, '-self') then ['/metrics'] else ['/livez']),
'--ignore-paths=' + std.join(',', if std.endsWith(c.name, '-self') then ['/readyz'] else ['/livez']),
],
volumeMounts: [
{
Expand Down Expand Up @@ -281,8 +281,8 @@ function(params)
name: selfPortName,
},
],
local livenessProbePath = 'livez',
local readinessProbePath = 'metrics',
local livenessProbePath = '/livez',
local readinessProbePath = '/readyz',
livenessProbe::: {
httpGet: {
path: livenessProbePath,
Expand Down

0 comments on commit 76e8331

Please sign in to comment.