feat(replicas): support --replicas and --machines for run command

This commit is contained in:
Pavel Sviderski
2025-02-28 17:53:58 +10:00
parent 6bb9bdeb5a
commit 9642863d7b
8 changed files with 87 additions and 147 deletions
+3
View File
@@ -23,6 +23,8 @@ type ServiceSpec struct {
Name string
// Ports defines what service ports to publish to make the service accessible outside the cluster.
Ports []PortSpec
// Replicas is the number of containers to run for the service. Only valid for a replicated service.
Replicas uint
}
func (s *ServiceSpec) Validate() error {
@@ -37,6 +39,7 @@ func (s *ServiceSpec) Validate() error {
}
// TODO: validate there is no conflict between ports.
// TODO: return error if there are non-HTTP/HTTPS ingress ports that we don't support yet.
return nil
}