cloud-sql-proxy-operator icon indicating copy to clipboard operation
cloud-sql-proxy-operator copied to clipboard

Feature Request: Proxy containers start before application containers

Open hessjcg opened this issue 2 years ago • 0 comments

K8s starts pod containers in the order they are specified, waiting for the post-start hook of a container to complete before moving to the next one. See Delaying application start until sidecar is ready blog post.

Implementation:

  • [ ] Add all proxy containers to the beginning of the the list of pod containers, before all the user-defined containers.
  • [ ] Add a postStart hook to the proxy container that calls the /ready hook. This ensures no other containers start until the proxy container is ready.

This will ensure that the proxy container is ready before any other containers are allowed to start in all supported versions of k8s.

hessjcg avatar Nov 28 '23 18:11 hessjcg