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 <[email protected]>
  • Loading branch information
zachaller authored Dec 8, 2023
1 parent 1305129 commit eeb2719
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 eeb2719

Please sign in to comment.