Skip to content

Commit

Permalink
limit multiple services per dataplane node
Browse files Browse the repository at this point in the history
  • Loading branch information
rboyer committed Oct 6, 2023
1 parent 0c40324 commit 6b31fad
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions testing/deployer/topology/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,13 @@ func compile(logger hclog.Logger, raw *Config, prev *Topology) (*Topology, error
return nil, fmt.Errorf("cluster %q node %q has more than one public address", c.Name, n.Name)
}

if n.IsDataplane() && len(n.Services) > 1 {
// Our use of consul-dataplane here is supposed to mimic that
// of consul-k8s, which ultimately has one IP per Service, so
// we introduce the same limitation here.
return nil, fmt.Errorf("cluster %q node %q uses dataplane, but has more than one service", c.Name, n.Name)
}

seenServices := make(map[ServiceID]struct{})
for _, svc := range n.Services {
if n.IsAgent() {
Expand Down

0 comments on commit 6b31fad

Please sign in to comment.