Skip to content

Commit

Permalink
Merge pull request #1258 from marquiz/fixes/nfd-master
Browse files Browse the repository at this point in the history
nfd-master: check for nil references in nfdAPIUpdateAllNodes
  • Loading branch information
k8s-ci-robot committed Jul 18, 2023
2 parents 9a108c0 + dac45be commit 5f181cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/nfd-master/nfd-master.go
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,10 @@ func (m *nfdMaster) nfdAPIUpdateAllNodes() error {
}

func (m *nfdMaster) nfdAPIUpdateOneNode(nodeName string) error {
if m.nfdController == nil || m.nfdController.featureLister == nil {
return nil
}

sel := k8sLabels.SelectorFromSet(k8sLabels.Set{nfdv1alpha1.NodeFeatureObjNodeNameLabel: nodeName})
objs, err := m.nfdController.featureLister.List(sel)
if err != nil {
Expand Down

0 comments on commit 5f181cc

Please sign in to comment.