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 <jan.nemcik@solargis.com>
  • Loading branch information
nemcikjan authored and mergify[bot] committed Dec 11, 2023
1 parent 1fb6d8f commit 3443546
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 3443546

Please sign in to comment.