From a312af9f632b985ec13f64918b918c5dcd02a15e Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Fri, 8 Dec 2023 09:26:08 -0600 Subject: [PATCH] fix: make sure we use the updated rs when we write back to informer (#3237) Signed-off-by: Zach Aller --- rollout/replicaset.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollout/replicaset.go b/rollout/replicaset.go index 401e1b579d..e33cfe14b0 100644 --- a/rollout/replicaset.go +++ b/rollout/replicaset.go @@ -34,7 +34,7 @@ func (c *rolloutContext) removeScaleDownDelay(rs *appsv1.ReplicaSet) error { return nil } patch := fmt.Sprintf(removeScaleDownAtAnnotationsPatch, v1alpha1.DefaultReplicaSetScaleDownDeadlineAnnotationKey) - _, err := c.kubeclientset.AppsV1().ReplicaSets(rs.Namespace).Patch(ctx, rs.Name, patchtypes.JSONPatchType, []byte(patch), metav1.PatchOptions{}) + rs, err := c.kubeclientset.AppsV1().ReplicaSets(rs.Namespace).Patch(ctx, rs.Name, patchtypes.JSONPatchType, []byte(patch), metav1.PatchOptions{}) if err != nil { return fmt.Errorf("error removing scale-down-deadline annotation from RS '%s': %w", rs.Name, err) }