1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

Merge pull request #1258 from marquiz/fixes/nfd-master

nfd-master: check for nil references in nfdAPIUpdateAllNodes
This commit is contained in:
Kubernetes Prow Robot 2023-07-18 05:23:09 -07:00 committed by GitHub
commit 5f181cc6d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -693,6 +693,10 @@ func (m *nfdMaster) nfdAPIUpdateAllNodes() error {
} }
func (m *nfdMaster) nfdAPIUpdateOneNode(nodeName string) 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}) sel := k8sLabels.SelectorFromSet(k8sLabels.Set{nfdv1alpha1.NodeFeatureObjNodeNameLabel: nodeName})
objs, err := m.nfdController.featureLister.List(sel) objs, err := m.nfdController.featureLister.List(sel)
if err != nil { if err != nil {