Skip to content

Commit

Permalink
ensure forced tags are added
Browse files Browse the repository at this point in the history
Signed-off-by: Kristoffer Dalby <[email protected]>
  • Loading branch information
kradalby committed Dec 17, 2024
1 parent 6167182 commit 339fe5f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hscontrol/grpcv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

"github.com/puzpuzpuz/xsync/v3"
"github.com/rs/zerolog/log"
"github.com/samber/lo"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/timestamppb"
Expand Down Expand Up @@ -487,8 +488,8 @@ func nodesToProto(polMan policy.PolicyManager, isLikelyConnected *xsync.MapOf[ty
resp.Online = true
}

validTags := polMan.Tags(node)
resp.ValidTags = validTags
tags := polMan.Tags(node)
resp.ValidTags = lo.Uniq(append(tags, node.ForcedTags...))
response[index] = resp
}

Expand Down

0 comments on commit 339fe5f

Please sign in to comment.