@@ -16,6 +16,7 @@ import (
1616 "k8s.io/apimachinery/pkg/util/intstr"
1717 "k8s.io/apimachinery/pkg/util/wait"
1818 e2eoutput "k8s.io/kubernetes/test/e2e/framework/pod/output"
19+ "k8s.io/pod-security-admission/api"
1920 utilpointer "k8s.io/utils/pointer"
2021
2122 routev1 "github.com/openshift/api/route/v1"
@@ -46,12 +47,9 @@ var _ = g.Describe("[sig-network][Feature:Router][apigroup:route.openshift.io]",
4647 }
4748 })
4849
49- oc = exutil .NewCLI ("router-config-manager" )
50+ oc = exutil .NewCLIWithPodSecurityLevel ("router-config-manager" , api . LevelPrivileged )
5051
5152 g .BeforeEach (func () {
52- // the test has been skipped since July 2018 because it was flaking.
53- // TODO: Fix the test and re-enable it in https://issues.redhat.com/browse/NE-906.
54- g .Skip ("HAProxy dynamic config manager tests skipped in 4.x" )
5553 ns = oc .Namespace ()
5654
5755 routerImage , err := exutil .FindRouterImage (oc )
@@ -462,7 +460,7 @@ http {
462460 Name : "cert" ,
463461 VolumeSource : corev1.VolumeSource {
464462 Secret : & corev1.SecretVolumeSource {
465- SecretName : "service -cert" ,
463+ SecretName : "serving -cert" ,
466464 },
467465 },
468466 },
@@ -491,9 +489,6 @@ http {
491489
492490 g .Describe ("The HAProxy router" , func () {
493491 g .It ("should serve the correct routes when running with the haproxy config manager" , func () {
494- // the test has been skipped since July 2018 because it was flaking.
495- // TODO: Fix the test and re-enable it in https://issues.redhat.com/browse/NE-906.
496- g .Skip ("HAProxy dynamic config manager tests skipped in 4.x" )
497492 ns := oc .KubeFramework ().Namespace .Name
498493 execPod := exutil .CreateExecPodOrFail (oc .AdminKubeClient (), ns , "execpod" )
499494 defer func () {
@@ -532,7 +527,10 @@ http {
532527 for i := 0 ; i < 16 ; i ++ {
533528 name := fmt .Sprintf ("hapcm-stress-insecure-%d" , i )
534529 hostName := fmt .Sprintf ("stress.insecure-%d.hapcm.test" , i )
535- err := oc .AsAdmin ().Run ("expose" ).Args ("service" , "insecure-service" , "--name" , name , "--hostname" , hostName , "--labels" , "select=haproxy-cfgmgr" ).Execute ()
530+ err := oc .AsAdmin ().Run ("expose" ).Args ("service" , "insecure-service" , "--name" , name , "--hostname" , hostName ).Execute ()
531+ o .Expect (err ).NotTo (o .HaveOccurred ())
532+ // --labels on `oc expose` (above) does not override the ones coming from service's selector.
533+ err = oc .AsAdmin ().Run ("label" ).Args ("route" , name , "select=haproxy-cfgmgr" ).Execute ()
536534 o .Expect (err ).NotTo (o .HaveOccurred ())
537535
538536 err = waitForRouteToRespond (ns , execPod .Name , "http" , hostName , "/" , routerIP , 0 )
0 commit comments