diff --git a/nomad/structs/node_class_test.go b/nomad/structs/node_class_test.go index f98ef668b..6e8f79041 100644 --- a/nomad/structs/node_class_test.go +++ b/nomad/structs/node_class_test.go @@ -13,6 +13,7 @@ func testNode() *Node { "version": "0.1.0", "driver.exec": "1", }, + UniqueAttributes: make(map[string]struct{}), Resources: &Resources{ CPU: 4000, MemoryMB: 8192, diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index ed82b7918..b58e60168 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -496,6 +496,9 @@ type Node struct { // client. This is opaque to Nomad. Meta map[string]string + // UniqueAttributes are attributes that uniquely identify a node. + UniqueAttributes map[string]struct{} + // NodeClass is an opaque identifier used to group nodes // together for the purpose of determining scheduling pressure. NodeClass string