linkerd / linkerd2

Ultralight, security-first service mesh for Kubernetes. Main repo for Linkerd 2.x.
https://linkerd.io
Apache License 2.0
10.71k stars 1.28k forks source link

fix(policy): remove readiness probe delay #13380

Closed olix0r closed 7 hours ago

olix0r commented 2 days ago

The policy container is configured differently than all other controllers: other controllers configure an initialDelaySeconds on their livenessProbe but not on their readinessProbe. The policy container, however, includes this configuration on its readinessProbe but not on its livenessProbe.

This commit fixes the policy container to match the other controllers.

This reduces pod readiness time from 20s to 4s.

olix0r commented 1 day ago

Reduces start time from 20s to 4s:

On edge:

:; time (kubectl rollout restart -n linkerd deploy linkerd-destination && kubectl wait --for=condition=ready pod -l linkerd.io/control-plane-component=des
tination -n linkerd --timeout=600s) 
deployment.apps/linkerd-destination restarted
pod/linkerd-destination-7587dbfcbf-5k79q condition met
pod/linkerd-destination-5774cc74d7-rphgl condition met
( kubectl rollout restart -n linkerd deploy linkerd-destination && kubectl   )  0.23s user 0.03s system 1% cpu 20.454 total

After:

:; time (kubectl rollout restart -n linkerd deploy linkerd-destination && kubectl wait --for=condition=ready pod -l linkerd.io/control-plane-component=destination -n linkerd
 --timeout=600s)
deployment.apps/linkerd-destination restarted
pod/linkerd-destination-5c99cb9657-q877q condition met
pod/linkerd-destination-848f56c669-gpjfk condition met
( kubectl rollout restart -n linkerd deploy linkerd-destination && kubectl   )  0.24s user 0.04s system 7% cpu 3.587 total