I have 2 containers in a pod. Main container and side car for sending logs to ELK.
I don't want the main container to restart when it fails, but I need the side car to get restarted automatically when it fails.
Setting RestartPolicy to Never is not restarting the side car also. Is there any way to set the restart policy at the container level?
We have a proposal to formalize sidecar container lifecycles: https://github.com/kubernetes/enhancements/blob/master/keps/sig-apps/sidecarcontainers.md
Take a look at that and see if it gets to what you need?