Skip to content

Commit

Permalink
nfd-master: check for nil references in nfdAPIUpdateAllNodes
Browse files Browse the repository at this point in the history
Just a safeguard.
  • Loading branch information
marquiz authored and k8s-infra-cherrypick-robot committed Jul 18, 2023
1 parent d22e871 commit f0026a9
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 @@ -633,6 +633,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 f0026a9

Please sign in to comment.