From bef9a22bda9890e46de29d0fa34447e9285154b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alby=20Hern=C3=A1ndez?= Date: Wed, 9 Mar 2022 15:35:45 +0000 Subject: [PATCH] Fix the update process --- config/manager/kustomization.yaml | 2 +- controllers/replika_sync.go | 10 +--------- deploy/deployment/replika-controller-manager.yaml | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 72c19dc..d9250db 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -13,4 +13,4 @@ kind: Kustomization images: - name: controller newName: prosimcorp/replika - newTag: v0.2.2 + newTag: v0.2.3 diff --git a/controllers/replika_sync.go b/controllers/replika_sync.go index 7ca08e3..8a5dd72 100644 --- a/controllers/replika_sync.go +++ b/controllers/replika_sync.go @@ -209,15 +209,7 @@ func (r *ReplikaReconciler) UpdateTarget(ctx context.Context, target *unstructur // Update the object patch, err := target.MarshalJSON() - err = r.Patch(context.Background(), target, client.RawPatch(types.MergePatchType, patch)) - - // Objects in Kubernetes are uniquely identified - // Set target UID to the UID received from de created resource - //target.SetUID(tmpTarget.GetUID()) - - //res := target.DeepCopy() - //res.SetResourceVersion(tmpTarget.GetResourceVersion()) - //err = r.Update(ctx, target.DeepCopy()) + err = r.Patch(ctx, target, client.RawPatch(types.MergePatchType, patch)) return err } diff --git a/deploy/deployment/replika-controller-manager.yaml b/deploy/deployment/replika-controller-manager.yaml index 9c55f43..6de708a 100644 --- a/deploy/deployment/replika-controller-manager.yaml +++ b/deploy/deployment/replika-controller-manager.yaml @@ -42,7 +42,7 @@ spec: - --leader-elect command: - /manager - image: prosimcorp/replika:v0.2.2 + image: prosimcorp/replika:v0.2.3 livenessProbe: httpGet: path: /healthz