@@ -2683,6 +2683,7 @@ func TestDescribePodSecurityPolicy(t *testing.T) {
2683
2683
expected := []string {
2684
2684
"Name:\\ s*mypsp" ,
2685
2685
"Allow Privileged:\\ s*false" ,
2686
+ "Allow Privilege Escalation:\\ s*false" ,
2686
2687
"Default Add Capabilities:\\ s*<none>" ,
2687
2688
"Required Drop Capabilities:\\ s*<none>" ,
2688
2689
"Allowed Capabilities:\\ s*<none>" ,
@@ -2704,13 +2705,15 @@ func TestDescribePodSecurityPolicy(t *testing.T) {
2704
2705
"Supplemental Groups Strategy: RunAsAny" ,
2705
2706
}
2706
2707
2708
+ falseVal := false
2707
2709
fake := fake .NewSimpleClientset (& policyv1beta1.PodSecurityPolicy {
2708
2710
ObjectMeta : metav1.ObjectMeta {
2709
2711
Name : "mypsp" ,
2710
2712
},
2711
2713
Spec : policyv1beta1.PodSecurityPolicySpec {
2712
- AllowedUnsafeSysctls : []string {"kernel.*" , "net.ipv4.ip_local_port_range" },
2713
- ForbiddenSysctls : []string {"net.ipv4.ip_default_ttl" },
2714
+ AllowPrivilegeEscalation : & falseVal ,
2715
+ AllowedUnsafeSysctls : []string {"kernel.*" , "net.ipv4.ip_local_port_range" },
2716
+ ForbiddenSysctls : []string {"net.ipv4.ip_default_ttl" },
2714
2717
SELinux : policyv1beta1.SELinuxStrategyOptions {
2715
2718
Rule : policyv1beta1 .SELinuxStrategyRunAsAny ,
2716
2719
},
0 commit comments