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:
commit
5f181cc6d0
1 changed files with 4 additions and 0 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue