From e9882cf42931c37e7e571a8c7e7c67647444352f Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Fri, 8 Dec 2023 08:50:48 -0600 Subject: [PATCH] fix: make sure we use the updated rs when we write back to informer 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 fc23464f50..912417ca1a 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) }