diff --git a/api/resources.go b/api/resources.go index b8de46e75..0b49c496e 100644 --- a/api/resources.go +++ b/api/resources.go @@ -16,5 +16,6 @@ type NetworkResource struct { Public bool CIDR string ReservedPorts []int + DynamicPorts []string MBits int } diff --git a/nomad/structs/network.go b/nomad/structs/network.go index 2a1e61ae8..9221adc7a 100644 --- a/nomad/structs/network.go +++ b/nomad/structs/network.go @@ -162,6 +162,7 @@ func (idx *NetworkIndex) AssignNetwork(ask *NetworkResource) (out *NetworkResour Device: n.Device, IP: ipStr, ReservedPorts: ask.ReservedPorts, + DynamicPorts: ask.DynamicPorts, } // Check if we need to generate any ports