Skip to content

Commit

Permalink
fix: make sure we use the updated rs when we write back to informer (#…
Browse files Browse the repository at this point in the history
…3237)

Signed-off-by: Zach Aller <zachaller@users.noreply.github.com>
  • Loading branch information
zachaller committed Dec 11, 2023
1 parent eaaef38 commit a312af9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rollout/replicaset.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit a312af9

Please sign in to comment.