rbd: updated node labels fetching logic

node labels are fetched only if controller is running in k8s and is nodeserver

Signed-off-by: Jan Nemcik <jan.nemcik@solargis.com>
This commit is contained in:
Jan Nemcik 2023-12-09 12:43:07 +01:00 committed by mergify[bot]
parent 1fb6d8f891
commit 3443546370

View File

@ -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())