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>
(cherry picked from commit 3443546)
  • Loading branch information
nemcikjan authored and mergify[bot] committed Dec 11, 2023
1 parent e7acce2 commit 9d9b67b
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 9d9b67b

Please sign in to comment.