Skip to content

Commit

Permalink
fix: don't set replicas if cluster.x-k8s.io/replicas-managed-by present
Browse files Browse the repository at this point in the history
  • Loading branch information
w21froster committed Sep 4, 2024
1 parent 77a2b0d commit 028bd30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exp/internal/webhooks/machinepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (webhook *MachinePool) Default(_ context.Context, obj runtime.Object) error
}
m.Labels[clusterv1.ClusterNameLabel] = m.Spec.ClusterName

if m.Spec.Replicas == nil && !annotations.IsExternallyManaged(m) {
if m.Spec.Replicas == nil && !annotations.ReplicasManagedByExternalAutoscaler(m) {
m.Spec.Replicas = pointer.Int32(1)
}

Expand Down

0 comments on commit 028bd30

Please sign in to comment.