@@ -460,7 +460,7 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount metrics and SELinuxWarningC
460
460
secondPodFailureEvent string
461
461
expectNodeIncreases sets.Set [string ] // For testing kubelet metrics
462
462
expectControllerConflictProperty string // For testing SELinuxWarningController metrics + events
463
- testTags []interface {}
463
+ testTags []interface {} // SELinuxMountReadWriteOncePod and SELinuxChangePolicy are always added automatically
464
464
}{
465
465
{
466
466
name : "warning is not bumped on two Pods with the same context on RWO volume" ,
@@ -470,7 +470,7 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount metrics and SELinuxWarningC
470
470
volumeMode : v1 .ReadWriteOnce ,
471
471
waitForSecondPodStart : true ,
472
472
expectNodeIncreases : sets .New [string ]( /* no metric is increased, admitted_total was already increased when the first pod started */ ),
473
- testTags : []interface {}{framework . WithFeatureGate ( features . SELinuxMountReadWriteOncePod ), feature .SELinuxMountReadWriteOncePodOnly },
473
+ testTags : []interface {}{feature .SELinuxMountReadWriteOncePodOnly },
474
474
},
475
475
{
476
476
name : "warning is bumped on two Pods with a different context on RWO volume" ,
@@ -481,7 +481,7 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount metrics and SELinuxWarningC
481
481
waitForSecondPodStart : true ,
482
482
expectNodeIncreases : sets.New [string ]("volume_manager_selinux_volume_context_mismatch_warnings_total" ),
483
483
expectControllerConflictProperty : "SELinuxLabel" ,
484
- testTags : []interface {}{framework . WithFeatureGate ( features . SELinuxMountReadWriteOncePod ), feature .SELinuxMountReadWriteOncePodOnly },
484
+ testTags : []interface {}{feature .SELinuxMountReadWriteOncePodOnly },
485
485
},
486
486
{
487
487
name : "warning is bumped on two Pods with different policies on RWO volume" ,
@@ -494,7 +494,7 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount metrics and SELinuxWarningC
494
494
waitForSecondPodStart : true ,
495
495
expectNodeIncreases : sets.New [string ]("volume_manager_selinux_volume_context_mismatch_warnings_total" ),
496
496
expectControllerConflictProperty : "SELinuxChangePolicy" ,
497
- testTags : []interface {}{framework . WithFeatureGate ( features . SELinuxMountReadWriteOncePod ), feature .SELinuxMountReadWriteOncePodOnly },
497
+ testTags : []interface {}{feature .SELinuxMountReadWriteOncePodOnly },
498
498
},
499
499
{
500
500
name : "warning is not bumped on two Pods with Recursive policy and a different context on RWO volume" ,
@@ -507,7 +507,7 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount metrics and SELinuxWarningC
507
507
waitForSecondPodStart : true ,
508
508
expectNodeIncreases : sets .New [string ]( /* no metric is increased, admitted_total was already increased when the first pod started */ ),
509
509
expectControllerConflictProperty : "" , /* SELinuxController does not emit any warning either */
510
- testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMountReadWriteOncePod ), framework . WithFeatureGate ( features . SELinuxChangePolicy ), feature .SELinuxMountReadWriteOncePodOnly },
510
+ testTags : []interface {}{framework .WithFeatureGate (features .SELinuxChangePolicy ), feature .SELinuxMountReadWriteOncePodOnly },
511
511
},
512
512
{
513
513
name : "error is not bumped on two Pods with the same context on RWO volume and SELinuxMount enabled" ,
@@ -517,7 +517,7 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount metrics and SELinuxWarningC
517
517
volumeMode : v1 .ReadWriteOnce ,
518
518
waitForSecondPodStart : true ,
519
519
expectNodeIncreases : sets .New [string ]( /* no metric is increased, admitted_total was already increased when the first pod started */ ),
520
- testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMountReadWriteOncePod ), framework . WithFeatureGate ( features . SELinuxMount )},
520
+ testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMount )},
521
521
},
522
522
{
523
523
name : "error is bumped on two Pods with a different context on RWO volume and SELinuxMount enabled" ,
@@ -529,7 +529,7 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount metrics and SELinuxWarningC
529
529
waitForSecondPodStart : false ,
530
530
expectNodeIncreases : sets.New [string ]("volume_manager_selinux_volume_context_mismatch_errors_total" ),
531
531
expectControllerConflictProperty : "SELinuxLabel" ,
532
- testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMountReadWriteOncePod ), framework . WithFeatureGate ( features . SELinuxMount )},
532
+ testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMount )},
533
533
},
534
534
{
535
535
name : "error is bumped on two Pods with a different policy on RWO volume and SELinuxMount enabled (nil + Recursive)" ,
@@ -543,7 +543,7 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount metrics and SELinuxWarningC
543
543
waitForSecondPodStart : false ,
544
544
expectNodeIncreases : sets.New [string ]("volume_manager_selinux_volume_context_mismatch_errors_total" ),
545
545
expectControllerConflictProperty : "SELinuxChangePolicy" ,
546
- testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMountReadWriteOncePod ), framework . WithFeatureGate ( features . SELinuxMount )},
546
+ testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMount )},
547
547
},
548
548
{
549
549
name : "error is bumped on two Pods with a different policy on RWO volume and SELinuxMount enabled (Recursive + nil)" ,
@@ -557,7 +557,7 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount metrics and SELinuxWarningC
557
557
waitForSecondPodStart : false ,
558
558
expectNodeIncreases : sets.New [string ]("volume_manager_selinux_volume_context_mismatch_errors_total" ),
559
559
expectControllerConflictProperty : "SELinuxChangePolicy" ,
560
- testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMountReadWriteOncePod ), framework . WithFeatureGate ( features . SELinuxMount )},
560
+ testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMount )},
561
561
},
562
562
{
563
563
name : "error is bumped on two Pods with a different policy on RWO volume and SELinuxMount enabled (Recursive + MountOption)" ,
@@ -571,7 +571,7 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount metrics and SELinuxWarningC
571
571
waitForSecondPodStart : false ,
572
572
expectNodeIncreases : sets.New [string ]("volume_manager_selinux_volume_context_mismatch_errors_total" ),
573
573
expectControllerConflictProperty : "SELinuxChangePolicy" ,
574
- testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMountReadWriteOncePod ), framework . WithFeatureGate ( features . SELinuxMount )},
574
+ testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMount )},
575
575
},
576
576
{
577
577
name : "error is bumped on two Pods with a different context on RWX volume and SELinuxMount enabled" ,
@@ -583,7 +583,7 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount metrics and SELinuxWarningC
583
583
waitForSecondPodStart : false ,
584
584
expectNodeIncreases : sets.New [string ]("volume_manager_selinux_volume_context_mismatch_errors_total" ),
585
585
expectControllerConflictProperty : "SELinuxLabel" ,
586
- testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMountReadWriteOncePod ), framework . WithFeatureGate ( features . SELinuxMount )},
586
+ testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMount )},
587
587
},
588
588
{
589
589
name : "error is not bumped on two Pods with Recursive policy and a different context on RWX volume" ,
@@ -596,7 +596,7 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount metrics and SELinuxWarningC
596
596
waitForSecondPodStart : true ,
597
597
expectNodeIncreases : sets .New [string ]( /* no metric is increased, admitted_total was already increased when the first pod started */ ),
598
598
expectControllerConflictProperty : "" , /* SELinuxController does not emit any warning either */
599
- testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMountReadWriteOncePod ), framework . WithFeatureGate ( features . SELinuxChangePolicy ), framework . WithFeatureGate ( features . SELinuxMount )},
599
+ testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMount )},
600
600
},
601
601
{
602
602
name : "error is not bumped on two Pods with a different policy RWX volume (nil + MountOption)" ,
@@ -608,7 +608,7 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount metrics and SELinuxWarningC
608
608
volumeMode : v1 .ReadWriteMany ,
609
609
waitForSecondPodStart : true ,
610
610
expectNodeIncreases : sets .New [string ]( /* no metric is increased, admitted_total was already increased when the first pod started */ ),
611
- testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMountReadWriteOncePod ), framework . WithFeatureGate ( features . SELinuxChangePolicy ), framework . WithFeatureGate ( features . SELinuxMount )},
611
+ testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMount )},
612
612
},
613
613
{
614
614
name : "error is not bumped on two Pods with a different policy RWX volume (MountOption + MountOption)" ,
@@ -620,7 +620,7 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount metrics and SELinuxWarningC
620
620
volumeMode : v1 .ReadWriteMany ,
621
621
waitForSecondPodStart : true ,
622
622
expectNodeIncreases : sets .New [string ]( /* no metric is increased, admitted_total was already increased when the first pod started */ ),
623
- testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMountReadWriteOncePod ), framework . WithFeatureGate ( features . SELinuxChangePolicy ), framework . WithFeatureGate ( features . SELinuxMount )},
623
+ testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMount )},
624
624
},
625
625
{
626
626
name : "error is bumped on two Pods with a different context on RWOP volume" ,
@@ -646,7 +646,7 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount metrics and SELinuxWarningC
646
646
waitForSecondPodStart : false ,
647
647
expectNodeIncreases : sets.New [string ]("volume_manager_selinux_volume_context_mismatch_errors_total" ),
648
648
expectControllerConflictProperty : "SELinuxLabel" ,
649
- testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMountReadWriteOncePod ), framework . WithFeatureGate ( features . SELinuxMount )},
649
+ testTags : []interface {}{framework .WithFeatureGate (features .SELinuxMount )},
650
650
},
651
651
}
652
652
for _ , t := range tests {
@@ -731,6 +731,8 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount metrics and SELinuxWarningC
731
731
args := []interface {}{
732
732
t .name ,
733
733
testFunc ,
734
+ framework .WithFeatureGate (features .SELinuxMountReadWriteOncePod ),
735
+ framework .WithFeatureGate (features .SELinuxChangePolicy ),
734
736
}
735
737
args = append (args , t .testTags ... )
736
738
framework .It (args ... )
0 commit comments