1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-28 02:37:11 +00:00

nfd-master: support noPublish with -prune

Better this way than to crash which is what currently happens with this
combination.
This commit is contained in:
Markus Lehtonen 2023-04-19 15:58:06 +03:00
parent 322574385f
commit 32db081f3a

View file

@ -384,6 +384,11 @@ func (m *nfdMaster) WaitForReady(timeout time.Duration) bool {
// Prune erases all NFD related properties from the node objects of the cluster.
func (m *nfdMaster) prune() error {
if m.config.NoPublish {
klog.Info("skipping pruning of nodes as noPublish config option is set")
return nil
}
cli, err := m.apihelper.GetClient()
if err != nil {
return err