Skip to content

Commit

Permalink
avoid to set past-replicas annotation to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
wpjunior committed Aug 29, 2024
1 parent 7c9400f commit 08f720f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/build/buildkit/scaler/downscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ func RunDownscaler(ctx context.Context, clientset kubernetes.Interface, podSelec
}

if statefulset.Spec.Replicas != nil {
if *statefulset.Spec.Replicas == 0 {
continue
}
statefulset.Annotations[metadata.DeployAgentLastReplicasAnnotationKey] = fmt.Sprintf("%d", *statefulset.Spec.Replicas)
}

Expand Down

0 comments on commit 08f720f

Please sign in to comment.