mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
fix(compose): remove ServiceSpec validation for 0 replicas, it's handled when resolving defaults
This commit is contained in:
@@ -125,11 +125,6 @@ func (d *Deployment) Validate(ctx context.Context) error {
|
||||
if mode != d.Service.Mode {
|
||||
return errors.New("service mode cannot be changed")
|
||||
}
|
||||
if mode == api.ServiceModeReplicated && d.Spec.Replicas < 1 {
|
||||
// Scaling down to zero is not allowed as this would effectively remove the service without preserving
|
||||
// its configuration, making it impossible to scale back up.
|
||||
return errors.New("number of replicas must be at least 1")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user