samba-in-kubernetes / samba-operator

An operator for a Samba as a service on PVCs in kubernetes
Apache License 2.0
101 stars 24 forks source link

resources: refine get-create logic for openshift elems #308

Closed synarete closed 1 year ago

synarete commented 1 year ago

When doing reconcile logic of Get-or-Create for OpenShift's elements, treat AlreadyExists error as transient error and just Get the element once again from the API server. This may happen in cases where there is a skew between apimachinery and client-go versions[1].

[1] https://github.com/kubernetes/client-go/issues/89

synarete commented 1 year ago

Code change looks OK. Was this weird behavior with the client something you experienced?

YES! It is also the motivation behind https://github.com/samba-in-kubernetes/samba-operator/pull/307

anoopcs9 commented 1 year ago

@Mergifyio rebase

mergify[bot] commented 1 year ago

rebase

✅ Branch has been successfully rebased