@@ -160,10 +160,6 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
160
160
AllowPodAffinityNamespaceSelector : true ,
161
161
}
162
162
163
- pspValidationOptions := policy_validation.PodSecurityPolicyValidationOptions {
164
- AllowEphemeralVolumeType : true ,
165
- }
166
-
167
163
// Enable CustomPodDNS for testing
168
164
// feature.DefaultFeatureGate.Set("CustomPodDNS=true")
169
165
switch t := obj .(type ) {
@@ -283,11 +279,7 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
283
279
if t .Namespace == "" {
284
280
t .Namespace = api .NamespaceDefault
285
281
}
286
- gv := schema.GroupVersion {
287
- Group : networking .GroupName ,
288
- Version : legacyscheme .Scheme .PrioritizedVersionsForGroup (networking .GroupName )[0 ].Version ,
289
- }
290
- errors = networking_validation .ValidateIngressCreate (t , gv )
282
+ errors = networking_validation .ValidateIngressCreate (t )
291
283
case * networking.IngressClass :
292
284
/*
293
285
if t.Namespace == "" {
@@ -301,7 +293,7 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
301
293
errors = networking_validation .ValidateIngressClass (t )
302
294
303
295
case * policy.PodSecurityPolicy :
304
- errors = policy_validation .ValidatePodSecurityPolicy (t , pspValidationOptions )
296
+ errors = policy_validation .ValidatePodSecurityPolicy (t )
305
297
case * apps.ReplicaSet :
306
298
if t .Namespace == "" {
307
299
t .Namespace = api .NamespaceDefault
@@ -405,7 +397,7 @@ func TestExampleObjectSchemas(t *testing.T) {
405
397
},
406
398
"admin/dns" : {
407
399
"busybox" : {& api.Pod {}},
408
- "dns-horizontal-autoscaler" : {& apps.Deployment {}},
400
+ "dns-horizontal-autoscaler" : {& api. ServiceAccount {}, & rbac. ClusterRole {}, & rbac. ClusterRoleBinding {}, & apps.Deployment {}},
409
401
"dnsutils" : {& api.Pod {}},
410
402
},
411
403
"admin/logging" : {
@@ -453,7 +445,7 @@ func TestExampleObjectSchemas(t *testing.T) {
453
445
},
454
446
"admin/sched" : {
455
447
"clusterrole" : {& rbac.ClusterRole {}},
456
- "my-scheduler" : {& api.ServiceAccount {}, & rbac.ClusterRoleBinding {}, & rbac.ClusterRoleBinding {}, & apps.Deployment {}},
448
+ "my-scheduler" : {& api.ServiceAccount {}, & rbac.ClusterRoleBinding {}, & rbac.ClusterRoleBinding {}, & api. ConfigMap {}, & apps.Deployment {}},
457
449
"pod1" : {& api.Pod {}},
458
450
"pod2" : {& api.Pod {}},
459
451
"pod3" : {& api.Pod {}},
@@ -592,6 +584,7 @@ func TestExampleObjectSchemas(t *testing.T) {
592
584
},
593
585
"pods/probe" : {
594
586
"exec-liveness" : {& api.Pod {}},
587
+ "grpc-liveness" : {& api.Pod {}},
595
588
"http-liveness" : {& api.Pod {}},
596
589
"pod-with-http-healthcheck" : {& api.Pod {}},
597
590
"pod-with-tcp-socket-healthcheck" : {& api.Pod {}},
@@ -620,11 +613,15 @@ func TestExampleObjectSchemas(t *testing.T) {
620
613
"security-context-4" : {& api.Pod {}},
621
614
},
622
615
"pods/storage" : {
623
- "projected" : {& api.Pod {}},
624
- "pv-claim" : {& api.PersistentVolumeClaim {}},
625
- "pv-pod" : {& api.Pod {}},
626
- "pv-volume" : {& api.PersistentVolume {}},
627
- "redis" : {& api.Pod {}},
616
+ "projected" : {& api.Pod {}},
617
+ "projected-secret-downwardapi-configmap" : {& api.Pod {}},
618
+ "projected-secrets-nondefault-permission-mode" : {& api.Pod {}},
619
+ "projected-service-account-token" : {& api.Pod {}},
620
+ "pv-claim" : {& api.PersistentVolumeClaim {}},
621
+ "pv-duplicate" : {& api.Pod {}},
622
+ "pv-pod" : {& api.Pod {}},
623
+ "pv-volume" : {& api.PersistentVolume {}},
624
+ "redis" : {& api.Pod {}},
628
625
},
629
626
"policy" : {
630
627
"baseline-psp" : {& policy.PodSecurityPolicy {}},
0 commit comments