fix: do not allow the same direct port-mapping on more than one node
This commit is contained in:
parent
99490ca7c1
commit
bb237d3389
@ -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")
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user