@@ -294,7 +294,7 @@ var _ = SIGDescribe("NFD master and worker", func() {
294
294
},
295
295
"*" : {},
296
296
}
297
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes , false ))
297
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes ))
298
298
299
299
checkNodeFeatureObject (ctx , workerPod .Spec .NodeName )
300
300
@@ -478,7 +478,7 @@ var _ = SIGDescribe("NFD master and worker", func() {
478
478
},
479
479
"*" : {},
480
480
}
481
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes , false ))
481
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes ))
482
482
483
483
By ("Deleting nfd-worker daemonset" )
484
484
err = f .ClientSet .AppsV1 ().DaemonSets (f .Namespace .Name ).Delete (ctx , workerDS .Name , metav1.DeleteOptions {})
@@ -523,14 +523,14 @@ var _ = SIGDescribe("NFD master and worker", func() {
523
523
},
524
524
"*" : {},
525
525
}
526
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes , false ))
526
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes ))
527
527
By ("Deleting NodeFeature object" )
528
528
err = nfdClient .NfdV1alpha1 ().NodeFeatures (f .Namespace .Name ).Delete (ctx , nodeFeatures [0 ], metav1.DeleteOptions {})
529
529
Expect (err ).NotTo (HaveOccurred ())
530
530
531
531
By ("Verifying node labels from NodeFeature object were removed" )
532
532
expectedLabels [targetNodeName ] = k8sLabels {}
533
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes , false ))
533
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes ))
534
534
535
535
By ("Creating nfd-worker daemonset" )
536
536
podSpecOpts := createPodSpecOpts (
@@ -552,7 +552,7 @@ var _ = SIGDescribe("NFD master and worker", func() {
552
552
nfdv1alpha1 .FeatureLabelNs + "/fake-fakefeature3" : "true" ,
553
553
},
554
554
}
555
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes , false ))
555
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes ))
556
556
557
557
By ("Re-creating NodeFeature object" )
558
558
_ , err = testutils .CreateOrUpdateNodeFeaturesFromFile (ctx , nfdClient , "nodefeature-1.yaml" , f .Namespace .Name , targetNodeName )
@@ -566,7 +566,7 @@ var _ = SIGDescribe("NFD master and worker", func() {
566
566
nfdv1alpha1 .FeatureLabelNs + "/fake-fakefeature2" : "true" ,
567
567
nfdv1alpha1 .FeatureLabelNs + "/fake-fakefeature3" : "overridden" ,
568
568
}
569
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes , false ))
569
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes ))
570
570
571
571
By ("Creating extra namespace" )
572
572
extraNs , err := f .CreateNamespace (ctx , "node-feature-discvery-extra-ns" , nil )
@@ -579,7 +579,7 @@ var _ = SIGDescribe("NFD master and worker", func() {
579
579
By ("Verifying node labels from NodeFeature object #2 are created" )
580
580
expectedLabels [targetNodeName ][nfdv1alpha1 .FeatureLabelNs + "/e2e-nodefeature-test-1" ] = "overridden-from-obj-2"
581
581
expectedLabels [targetNodeName ][nfdv1alpha1 .FeatureLabelNs + "/e2e-nodefeature-test-3" ] = "obj-2"
582
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes , false ))
582
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes ))
583
583
584
584
By ("Deleting NodeFeature object from the extra namespace" )
585
585
err = nfdClient .NfdV1alpha1 ().NodeFeatures (extraNs .Name ).Delete (ctx , nodeFeatures [0 ], metav1.DeleteOptions {})
@@ -588,7 +588,7 @@ var _ = SIGDescribe("NFD master and worker", func() {
588
588
By ("Verifying node labels from NodeFeature object were removed" )
589
589
expectedLabels [targetNodeName ][nfdv1alpha1 .FeatureLabelNs + "/e2e-nodefeature-test-1" ] = "obj-1"
590
590
delete (expectedLabels [targetNodeName ], nfdv1alpha1 .FeatureLabelNs + "/e2e-nodefeature-test-3" )
591
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes , false ))
591
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes ))
592
592
})
593
593
594
594
It ("denied labels should not be created by the NodeFeature object" , func (ctx context.Context ) {
@@ -615,14 +615,14 @@ var _ = SIGDescribe("NFD master and worker", func() {
615
615
"custom.vendor.io/e2e-nodefeature-test-3" : "vendor-ns" ,
616
616
},
617
617
}
618
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes , false ))
618
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes ))
619
619
620
620
By ("Deleting NodeFeature object" )
621
621
err = nfdClient .NfdV1alpha1 ().NodeFeatures (f .Namespace .Name ).Delete (ctx , nodeFeatures [0 ], metav1.DeleteOptions {})
622
622
Expect (err ).NotTo (HaveOccurred ())
623
623
624
624
expectedLabels [targetNodeName ] = k8sLabels {}
625
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes , false ))
625
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes ))
626
626
})
627
627
})
628
628
@@ -698,7 +698,7 @@ core:
698
698
Expect (testutils .CreateNodeFeatureRulesFromFile (ctx , nfdClient , "nodefeaturerule-1.yaml" )).NotTo (HaveOccurred ())
699
699
700
700
By ("Verifying node labels from NodeFeatureRules #1" )
701
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes , false ))
701
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes ))
702
702
703
703
By ("Creating NodeFeatureRules #2" )
704
704
Expect (testutils .CreateNodeFeatureRulesFromFile (ctx , nfdClient , "nodefeaturerule-2.yaml" )).NotTo (HaveOccurred ())
@@ -714,8 +714,8 @@ core:
714
714
}
715
715
716
716
By ("Verifying node labels from NodeFeatureRules #1 and #2" )
717
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes , false ))
718
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchAnnotations (expectedAnnotations , nodes , false ))
717
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes ))
718
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchAnnotations (expectedAnnotations , nodes ))
719
719
720
720
// Add features from NodeFeatureRule #3
721
721
By ("Creating NodeFeatureRules #3" )
@@ -743,8 +743,8 @@ core:
743
743
}
744
744
expectedAnnotations ["*" ]["nfd.node.kubernetes.io/taints" ] = "feature.node.kubernetes.io/fake-special-node=exists:PreferNoSchedule,feature.node.kubernetes.io/fake-dedicated-node=true:NoExecute,feature.node.kubernetes.io/performance-optimized-node=true:NoExecute"
745
745
746
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchTaints (expectedTaints , nodes , false ))
747
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchAnnotations (expectedAnnotations , nodes , false ))
746
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchTaints (expectedTaints , nodes ))
747
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchAnnotations (expectedAnnotations , nodes ))
748
748
749
749
By ("Re-applying NodeFeatureRules #3 with updated taints" )
750
750
Expect (testutils .UpdateNodeFeatureRulesFromFile (ctx , nfdClient , "nodefeaturerule-3-updated.yaml" )).NotTo (HaveOccurred ())
@@ -763,16 +763,16 @@ core:
763
763
expectedAnnotations ["*" ]["nfd.node.kubernetes.io/taints" ] = "feature.node.kubernetes.io/fake-special-node=exists:PreferNoSchedule,feature.node.kubernetes.io/foo=true:NoExecute"
764
764
765
765
By ("Verifying updated node taints and annotation from NodeFeatureRules #3" )
766
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchTaints (expectedTaints , nodes , false ))
767
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchAnnotations (expectedAnnotations , nodes , false ))
766
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchTaints (expectedTaints , nodes ))
767
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchAnnotations (expectedAnnotations , nodes ))
768
768
769
769
By ("Deleting NodeFeatureRule object" )
770
770
err = nfdClient .NfdV1alpha1 ().NodeFeatureRules ().Delete (ctx , "e2e-test-3" , metav1.DeleteOptions {})
771
771
Expect (err ).NotTo (HaveOccurred ())
772
772
expectedTaints ["*" ] = []corev1.Taint {}
773
773
delete (expectedAnnotations ["*" ], "nfd.node.kubernetes.io/taints" )
774
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchTaints (expectedTaints , nodes , false ))
775
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchAnnotations (expectedAnnotations , nodes , false ))
774
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchTaints (expectedTaints , nodes ))
775
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchAnnotations (expectedAnnotations , nodes ))
776
776
777
777
expectedAnnotations ["*" ]["nfd.node.kubernetes.io/extended-resources" ] = "nons,vendor.feature.node.kubernetes.io/static,vendor.io/dynamic"
778
778
@@ -788,10 +788,10 @@ core:
788
788
Expect (testutils .CreateNodeFeatureRulesFromFile (ctx , nfdClient , "nodefeaturerule-4.yaml" )).NotTo (HaveOccurred ())
789
789
790
790
By ("Verifying node annotations from NodeFeatureRules #4" )
791
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchAnnotations (expectedAnnotations , nodes , false ))
791
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchAnnotations (expectedAnnotations , nodes ))
792
792
793
793
By ("Verfiying node status capacity from NodeFeatureRules #4" )
794
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchCapacity (expectedCapacity , nodes , false ))
794
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchCapacity (expectedCapacity , nodes ))
795
795
796
796
By ("Deleting NodeFeatureRule object" )
797
797
err = nfdClient .NfdV1alpha1 ().NodeFeatureRules ().Delete (ctx , "e2e-extened-resource-test" , metav1.DeleteOptions {})
@@ -800,8 +800,8 @@ core:
800
800
By ("Verfiying node status capacity from NodeFeatureRules #4" )
801
801
expectedCapacity = map [string ]corev1.ResourceList {"*" : {}}
802
802
delete (expectedAnnotations ["*" ], "nfd.node.kubernetes.io/extended-resources" )
803
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchCapacity (expectedCapacity , nodes , false ))
804
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchAnnotations (expectedAnnotations , nodes , false ))
803
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchCapacity (expectedCapacity , nodes ))
804
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchAnnotations (expectedAnnotations , nodes ))
805
805
806
806
By ("Deleting nfd-worker daemonset" )
807
807
err = f .ClientSet .AppsV1 ().DaemonSets (f .Namespace .Name ).Delete (ctx , workerDS .Name , metav1.DeleteOptions {})
@@ -845,7 +845,7 @@ denyLabelNs: ["*.denied.ns","random.unwanted.ns"]
845
845
"custom.vendor.io/e2e-nodefeature-test-3" : "vendor-ns" ,
846
846
},
847
847
}
848
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes , false ))
848
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes ))
849
849
By ("Deleting NodeFeature object" )
850
850
err = nfdClient .NfdV1alpha1 ().NodeFeatures (f .Namespace .Name ).Delete (ctx , nodeFeatures [0 ], metav1.DeleteOptions {})
851
851
Expect (err ).NotTo (HaveOccurred ())
@@ -866,7 +866,7 @@ denyLabelNs: []
866
866
"random.unwanted.ns/e2e-nodefeature-test-2" : "unwanted-ns" ,
867
867
},
868
868
}
869
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes , false ))
869
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes ))
870
870
})
871
871
})
872
872
@@ -907,7 +907,7 @@ resyncPeriod: "1s"
907
907
},
908
908
"*" : {},
909
909
}
910
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes , false ))
910
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes ))
911
911
912
912
patches , err := json .Marshal (
913
913
[]apihelper.JsonPatch {
@@ -924,7 +924,7 @@ resyncPeriod: "1s"
924
924
_ , err = f .ClientSet .CoreV1 ().Nodes ().Patch (ctx , targetNodeName , types .JSONPatchType , patches , metav1.PatchOptions {})
925
925
Expect (err ).NotTo (HaveOccurred ())
926
926
927
- eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes , false ))
927
+ eventuallyNonControlPlaneNodes (ctx , f .ClientSet ).Should (MatchLabels (expectedLabels , nodes ))
928
928
929
929
By ("Deleting NodeFeature object" )
930
930
err = nfdClient .NfdV1alpha1 ().NodeFeatures (f .Namespace .Name ).Delete (ctx , nodeFeatures [0 ], metav1.DeleteOptions {})
0 commit comments