operator: fix operator behaviour when kube-apiserver is down
operator: fix operator behaviour when kube-apiserver is down

* This commit fixes an issue in Cilium dev environment wherein if
  kube-apiserver is stopped then cilium-operator does not restarts after
  loosing leader election. This was happening because we were returning
  exit code 0 on loosing leader election. This was causing systemd to
  not restart cilium-operator as the case is not regarded as failure.
  This was working fine with Kubernetes deployment of operator as we have
  restart policy set to always for operator deployment.

 * One edge case is fixed where now we do an exit if an error is
   returned when updating K8s capabilities. Earlier this could lead to
   an inconsistent behaviour in the cluster as we can misinterpret
   capabilities if kube-apiserver was down.

Fixes: df90c99905ad "operator: support HA mode for operator using k8s leaderelection library"

Fixes #13185

Signed-off-by: Deepesh Pathak <f919440c3f96a4d11125a0337b02a5a6cc587b4e@gmail.com>

michi-covalent/cilium,michi-covalent/cilium,michi-covalent/cilium,tklauser/cilium,tgraf/cilium,tgraf/cilium,cilium-team/cilium,tklauser/cilium,michi-covalent/cilium,tklauser/cilium,tgraf/cilium,cilium/cilium,tgraf/cilium,cilium/cilium,michi-covalent/cilium,cilium-team/cilium,cilium/cilium,tklauser/cilium,tgraf/cilium,tgraf/cilium,cilium/cilium,tklauser/cilium,cilium/cilium