k8s: Retry CRD update upon conflict
k8s: Retry CRD update upon conflict

Previously, when the Operators started up and were updating the CRDs, it
was a race to who can update the CRDs first. Any Operator that wasn't
first would error out and fatal (see linked issue for the msg).

This commit fixes this by checking if the update operation ended in a
conflict. If it did, then we retry the operation which includes fetching
the latest version from the apiserver. We can detect this error because
the K8s client libraries expose a convenience function
(errors.IsConflict()) to check for these kinds of errors, as they are
quite common in K8s code.

Fixes: https://github.com/cilium/cilium/issues/14283

Signed-off-by: Chris Tarazi <711c73f64afdce07b7e38039a96d2224209e9a6c@isovalent.com>

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