A k8s sidecar is an init container that starts before the main app container and continues to run. This is unlike a regular init container which always runs to completion before the app container starts.
PR changes
we need to account for the difference between an init sidecar container and a regular init container.
to identify which is an init sidecar container, we check for where restart policy is not nil and set to restartalways
to identify if the init sidecar is ready, we check that it has a running state and the container started is set to true. This is the same pattern as upstream kubectl get pods command.
Description
A k8s sidecar is an init container that starts before the main app container and continues to run. This is unlike a regular init container which always runs to completion before the app container starts.
Reading
PR changes we need to account for the difference between an init sidecar container and a regular init container.
Testing Performed
Existing unit tests Manual