mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-08-19 04:26:45 +00:00
fix: best effort patch reconciling status (#1952)
* fix(controller): decode old object for delete requests Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * chore: modernize golang Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * chore: modernize golang Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * chore: modernize golang Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * fix: preserve ca-bundles injected from external providers Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * fix: best effort patch reconciling status Signed-off-by: Oliver Baehler <oliver@sudo-i.net> --------- Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> Signed-off-by: Oliver Baehler <oliver@sudo-i.net>
This commit is contained in:
@@ -206,14 +206,13 @@ func (r *globalResourceController) Reconcile(ctx context.Context, request reconc
|
||||
return requeue, nil
|
||||
}
|
||||
|
||||
// Best-Effort for Updating the status
|
||||
if updateErr := r.updateReconcilingStatus(ctx, tntResource); updateErr != nil {
|
||||
if caperrors.IgnoreGone(updateErr) {
|
||||
return reconcile.Result{}, nil
|
||||
}
|
||||
|
||||
statusErr = gherrors.Wrap(updateErr, "failed to update status")
|
||||
|
||||
return requeue, nil
|
||||
log.Error(updateErr, "failed to update status")
|
||||
}
|
||||
|
||||
if c == nil {
|
||||
|
||||
@@ -246,14 +246,13 @@ func (r *namespacedResourceController) Reconcile(ctx context.Context, request re
|
||||
return requeue, nil
|
||||
}
|
||||
|
||||
// Best-Effort for Updating the status
|
||||
if updateErr := r.updateReconcilingStatus(ctx, tntResource); updateErr != nil {
|
||||
if caperrors.IgnoreGone(updateErr) {
|
||||
return reconcile.Result{}, nil
|
||||
}
|
||||
|
||||
statusErr = gherrors.Wrap(updateErr, "failed to update status")
|
||||
|
||||
return requeue, nil
|
||||
log.Error(updateErr, "failed to update status")
|
||||
}
|
||||
|
||||
if c == nil {
|
||||
|
||||
Reference in New Issue
Block a user