Skip to content

Commit

Permalink
Add readinessProbe/minReadySeconds to kube-router
Browse files Browse the repository at this point in the history
This allows for better feedback of kube-router health via the DaemonSet
resource. Without those, it's possible to observe a "healthy" DaemonSet,
even if it's not. This affects e.g. rolling updates, and, most notably
k0s's own integration tests.

Signed-off-by: Tom Wieczorek <twieczorek@mirantis.com>
  • Loading branch information
twz123 committed May 16, 2024
1 parent 4141997 commit 65fcf39
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions pkg/component/controller/kuberouter.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ spec:
spec:
priorityClassName: system-node-critical
serviceAccountName: kube-router
minReadySeconds: 5
initContainers:
- name: install-cni-bins
image: {{ .CNIInstallerImage }}
Expand Down Expand Up @@ -321,12 +322,25 @@ spec:
fieldPath: metadata.name
- name: KUBE_ROUTER_CNI_CONF_FILE
value: /etc/cni/net.d/10-kuberouter.conflist
ports:
- name: healthz
containerPort: 20244
livenessProbe:
httpGet:
path: /healthz
port: 20244
initialDelaySeconds: 10
port: healthz
initialDelaySeconds: 300
periodSeconds: 10
timeoutSeconds: 10
failureThreshold: 6
readinessProbe:
httpGet:
path: /healthz
port: healthz
periodSeconds: 3
timeoutSeconds: 3
failureThreshold: 3
successThreshold: 3
resources:
requests:
cpu: 250m
Expand Down

0 comments on commit 65fcf39

Please sign in to comment.