Skip to content

Commit

Permalink
Allow setting labels on nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Oct 29, 2024
1 parent 3a39742 commit 8ffb54a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions integration-tests/deployment/devenv/don.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type NodeInfo struct {
Name string // name of the node, used to identify the node, helpful in logs
AdminAddr string // admin address to send payments to, applicable only for non-bootstrap nodes
MultiAddr string // multi address denoting node's FQN (needed for deriving P2PBootstrappers in OCR), applicable only for bootstrap nodes
Labels map[string]string // labels to use when registering the node with job distributor
}

type DON struct {
Expand Down Expand Up @@ -105,6 +106,12 @@ func NewRegisteredDON(ctx context.Context, nodeInfo []NodeInfo, jd JobDistributo
return nil, fmt.Errorf("failed to create node %d: %w", i, err)
}
// node Labels so that it's easier to query them
for key, value := range info.Labels {
node.labels = append(node.labels, &ptypes.Label{
Key: key,
Value: pointer.ToString(value),
})
}
if info.IsBootstrap {
// create multi address for OCR2, applicable only for bootstrap nodes
if info.MultiAddr == "" {
Expand Down

0 comments on commit 8ffb54a

Please sign in to comment.