Skip to content

Commit

Permalink
rbd: updated node labels fetching logic
Browse files Browse the repository at this point in the history
node labels are fetched only if controller is running in k8s and is nodeserver

Signed-off-by: Jan Nemcik <[email protected]>
  • Loading branch information
Jan Nemcik committed Dec 9, 2023
1 parent 9494dc0 commit 2dd0494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/rbd/driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (r *Driver) Run(conf *util.Config) {
})
}

if k8s.RunsOnKubernetes() {
if k8s.RunsOnKubernetes() && conf.IsNodeServer {
nodeLabels, err = k8s.GetNodeLabels(conf.NodeID)
if err != nil {
log.FatalLogMsg(err.Error())
Expand Down

0 comments on commit 2dd0494

Please sign in to comment.