@@ -156,10 +156,6 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
156
156
AllowExpandedDNSConfig : true ,
157
157
}
158
158
159
- quotaValidationOptions := validation.ResourceQuotaValidationOptions {
160
- AllowPodAffinityNamespaceSelector : true ,
161
- }
162
-
163
159
// Enable CustomPodDNS for testing
164
160
// feature.DefaultFeatureGate.Set("CustomPodDNS=true")
165
161
switch t := obj .(type ) {
@@ -220,7 +216,7 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
220
216
if t .Namespace == "" {
221
217
t .Namespace = api .NamespaceDefault
222
218
}
223
- errors = validation .ValidateResourceQuota (t , quotaValidationOptions )
219
+ errors = validation .ValidateResourceQuota (t )
224
220
case * api.Secret :
225
221
if t .Namespace == "" {
226
222
t .Namespace = api .NamespaceDefault
@@ -303,7 +299,7 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
303
299
if t .Namespace == "" {
304
300
t .Namespace = api .NamespaceDefault
305
301
}
306
- errors = batch_validation .ValidateCronJob (t , podValidationOptions )
302
+ errors = batch_validation .ValidateCronJobCreate (t , podValidationOptions )
307
303
case * networking.NetworkPolicy :
308
304
if t .Namespace == "" {
309
305
t .Namespace = api .NamespaceDefault
@@ -519,17 +515,20 @@ func TestExampleObjectSchemas(t *testing.T) {
519
515
"configmap-multikeys" : {& api.ConfigMap {}},
520
516
},
521
517
"controllers" : {
522
- "daemonset" : {& apps.DaemonSet {}},
523
- "fluentd-daemonset" : {& apps.DaemonSet {}},
524
- "fluentd-daemonset-update" : {& apps.DaemonSet {}},
525
- "frontend" : {& apps.ReplicaSet {}},
526
- "hpa-rs" : {& autoscaling.HorizontalPodAutoscaler {}},
527
- "job" : {& batch.Job {}},
528
- "replicaset" : {& apps.ReplicaSet {}},
529
- "replication" : {& api.ReplicationController {}},
530
- "replication-nginx-1.14.2" : {& api.ReplicationController {}},
531
- "replication-nginx-1.16.1" : {& api.ReplicationController {}},
532
- "nginx-deployment" : {& apps.Deployment {}},
518
+ "daemonset" : {& apps.DaemonSet {}},
519
+ "fluentd-daemonset" : {& apps.DaemonSet {}},
520
+ "fluentd-daemonset-update" : {& apps.DaemonSet {}},
521
+ "frontend" : {& apps.ReplicaSet {}},
522
+ "hpa-rs" : {& autoscaling.HorizontalPodAutoscaler {}},
523
+ "job" : {& batch.Job {}},
524
+ "job-pod-failure-policy-example" : {& batch.Job {}},
525
+ "job-pod-failure-policy-failjob" : {& batch.Job {}},
526
+ "job-pod-failure-policy-ignore" : {& batch.Job {}},
527
+ "replicaset" : {& apps.ReplicaSet {}},
528
+ "replication" : {& api.ReplicationController {}},
529
+ "replication-nginx-1.14.2" : {& api.ReplicationController {}},
530
+ "replication-nginx-1.16.1" : {& api.ReplicationController {}},
531
+ "nginx-deployment" : {& apps.Deployment {}},
533
532
},
534
533
"debug" : {
535
534
"counter-pod" : {& api.Pod {}},
@@ -564,6 +563,7 @@ func TestExampleObjectSchemas(t *testing.T) {
564
563
"share-process-namespace" : {& api.Pod {}},
565
564
"simple-pod" : {& api.Pod {}},
566
565
"two-container-pod" : {& api.Pod {}},
566
+ "user-namespaces-stateless" : {& api.Pod {}},
567
567
},
568
568
"pods/config" : {
569
569
"redis-pod" : {& api.Pod {}},
0 commit comments