diff --git a/cmd/cluster/clusterCreate.go b/cmd/cluster/clusterCreate.go index 543084d7..0fb8ce3e 100644 --- a/cmd/cluster/clusterCreate.go +++ b/cmd/cluster/clusterCreate.go @@ -484,10 +484,6 @@ func applyCLIOverrides(cfg conf.SimpleConfig) (conf.SimpleConfig, error) { log.Fatalln(err) } - if len(filters) > 1 { - log.Fatalln("Can only apply a Portmap to one node") - } - // create new entry or append filter to existing entry if _, exists := portFilterMap[portmap]; exists { log.Fatalln("Same Portmapping can not be used for multiple nodes") diff --git a/pkg/config/transform.go b/pkg/config/transform.go index b1850d14..fda040c5 100644 --- a/pkg/config/transform.go +++ b/pkg/config/transform.go @@ -219,6 +219,9 @@ func TransformSimpleToClusterConfig(ctx context.Context, runtime runtimes.Runtim } } } else if suffix == "direct" { + if len(nodes) > 1 { + return nil, fmt.Errorf("error: cannot apply a direct port-mapping (%s) to more than one node", portmappings) + } for _, node := range nodes { if err := addPortMappings(node, portmappings); err != nil { return nil, err