I wonder if it is possible to use container restart policy "always"
or "onFailure"
only if the pod has min. one clean start?
Something like this:
first start -> failed -> never start again
first start -> ok -> "some error" while running -> restart
thanks and best regards.
This is not possible with Kubernetes/OpenShift built-in controllers. If you need custom behavior you could create a custom resource and a corresponding controller (operator). For more information consider Custom Resources and "Extend the Kubernetes API with CustomResourceDefinitions" in the Kubernetes docs.