@@ -1626,53 +1626,8 @@ var _ = Describe("Starting CatalogSource e2e tests", Label("CatalogSource"), fun
1626
1626
return nil
1627
1627
}).Should (BeNil ())
1628
1628
})
1629
- When ("A CatalogSource built with opm v1.21.0 (<v1.23.2)is created with spec.GrpcPodConfig.SecurityContextConfig set to restricted" , func () {
1630
- var sourceName string
1631
- BeforeEach (func () {
1632
- sourceName = genName ("catalog-" )
1633
- source := & v1alpha1.CatalogSource {
1634
- TypeMeta : metav1.TypeMeta {
1635
- Kind : v1alpha1 .CatalogSourceKind ,
1636
- APIVersion : v1alpha1 .CatalogSourceCRDAPIVersion ,
1637
- },
1638
- ObjectMeta : metav1.ObjectMeta {
1639
- Name : sourceName ,
1640
- Namespace : generatedNamespace .GetName (),
1641
- Labels : map [string ]string {"olm.catalogSource" : sourceName },
1642
- },
1643
- Spec : v1alpha1.CatalogSourceSpec {
1644
- SourceType : v1alpha1 .SourceTypeGrpc ,
1645
- Image : "quay.io/olmtest/old-opm-catsrc:v1.21.0" ,
1646
- GrpcPodConfig : & v1alpha1.GrpcPodConfig {
1647
- SecurityContextConfig : v1alpha1 .Restricted ,
1648
- },
1649
- },
1650
- }
1651
-
1652
- Eventually (func () error {
1653
- _ , err := crc .OperatorsV1alpha1 ().CatalogSources (source .GetNamespace ()).Create (context .Background (), source , metav1.CreateOptions {})
1654
- return err
1655
- }).Should (Succeed ())
1656
- })
1657
- It ("The registry pod fails to become come up because of lack of permission" , func () {
1658
- Eventually (func () (bool , error ) {
1659
- podList , err := c .KubernetesInterface ().CoreV1 ().Pods (generatedNamespace .GetName ()).List (context .TODO (), metav1.ListOptions {})
1660
- if err != nil {
1661
- return false , err
1662
- }
1663
- for _ , pod := range podList .Items {
1664
- if pod .ObjectMeta .OwnerReferences != nil && pod .ObjectMeta .OwnerReferences [0 ].Name == sourceName {
1665
- if pod .Status .ContainerStatuses != nil && pod .Status .ContainerStatuses [0 ].State .Terminated != nil {
1666
- return true , nil
1667
- }
1668
- }
1669
- }
1670
- return false , nil
1671
- }).Should (BeTrue ())
1672
- })
1673
- })
1674
1629
})
1675
- When ("The namespace is labled as Pod Security Admission policy enforce:baseline " , func () {
1630
+ When ("The namespace is labled as Pod Security Admission policy enforce:restricted " , func () {
1676
1631
BeforeEach (func () {
1677
1632
var err error
1678
1633
testNS := & corev1.Namespace {}
@@ -1685,7 +1640,7 @@ var _ = Describe("Starting CatalogSource e2e tests", Label("CatalogSource"), fun
1685
1640
}).Should (BeNil ())
1686
1641
1687
1642
testNS .ObjectMeta .Labels = map [string ]string {
1688
- "pod-security.kubernetes.io/enforce" : "baseline " ,
1643
+ "pod-security.kubernetes.io/enforce" : "restricted " ,
1689
1644
"pod-security.kubernetes.io/enforce-version" : "latest" ,
1690
1645
}
1691
1646
0 commit comments