-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
COMPUTE-6881: Prevent following initContainer to run if previous sidecar container failed #48
base: release-1.30.4-lyft.1
Are you sure you want to change the base?
Conversation
/ptal @abhinavdahiya @tomwans |
what's wrong with moving on to next init container if previous one starts but fails after. eventually all will be fine. |
per Lyft's design, we might have chance to see the below scenario which we want to avoid.
|
but the container will restart and be running again, which is the expected workflow. this is also how currently sidecars behave with Lyft-Patch. if the sidecar container fails, it is restarted. |
We only enforce the first time Pod starting procedures. |
I don't think this is a requirement for our sidecar containers. We don't really care if the sidecar containers restart as many time during pod startup. We expect eventually consistency.. What we care is application container is started only after all sidecars are ready kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go Lines 997 to 1000 in cc8d8ad
and after things are ready, future failures are also part of normal operation from the perspective of the kubelet for us. |
also i did some testing with https://github.com/lyft/k8senvoy/pull/1325/commits/406b3f70aefc988e32f81e089dc2d2c402b24911
and then updated boba4 to test pyexample2
the envoymesh container failed, but is actually being restarted. Both the outcomes i would say are correct imo.
the problem is that the app container is also running. In general what i'm understanding the behavior of native sidecar is that app container will be started after all sidecar containers are started (regardless of their state)... It does not wait for them to become ready. |
The upstream Kubelet native sidecar implementation favors 'not blocking follow up sidecar container",
so it won't wait if this is a Sidecar container even it failed to start.
For us we like to have the strong dependency, e.g. in any sidecar container fails, it will stop proceeding.
Credit to @. abhinavdahiya here