[zh] Clean PodPreset related pages/examples
This commit is contained in:
@@ -56,9 +56,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/apis/rbac"
|
||||
rbac_validation "k8s.io/kubernetes/pkg/apis/rbac/validation"
|
||||
|
||||
"k8s.io/kubernetes/pkg/apis/settings"
|
||||
settings_validation "k8s.io/kubernetes/pkg/apis/settings/validation"
|
||||
|
||||
"k8s.io/kubernetes/pkg/apis/storage"
|
||||
storage_validation "k8s.io/kubernetes/pkg/apis/storage/validation"
|
||||
|
||||
@@ -297,11 +294,6 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
|
||||
case *rbac.ClusterRoleBinding:
|
||||
// clusterolebinding does not accept namespace
|
||||
errors = rbac_validation.ValidateClusterRoleBinding(t)
|
||||
case *settings.PodPreset:
|
||||
if t.Namespace == "" {
|
||||
t.Namespace = api.NamespaceDefault
|
||||
}
|
||||
errors = settings_validation.ValidatePodPreset(t)
|
||||
case *storage.StorageClass:
|
||||
// storageclass does not accept namespace
|
||||
errors = storage_validation.ValidateStorageClass(t)
|
||||
@@ -519,20 +511,6 @@ func TestExampleObjectSchemas(t *testing.T) {
|
||||
"node-problem-detector-configmap": {&apps.DaemonSet{}},
|
||||
"termination": {&api.Pod{}},
|
||||
},
|
||||
"podpreset": {
|
||||
"allow-db": {&settings.PodPreset{}},
|
||||
"allow-db-merged": {&api.Pod{}},
|
||||
"configmap": {&api.ConfigMap{}},
|
||||
"conflict-pod": {&api.Pod{}},
|
||||
"conflict-preset": {&settings.PodPreset{}},
|
||||
"merged": {&api.Pod{}},
|
||||
"multi-merged": {&api.Pod{}},
|
||||
"pod": {&api.Pod{}},
|
||||
"preset": {&settings.PodPreset{}},
|
||||
"proxy": {&settings.PodPreset{}},
|
||||
"replicaset-merged": {&api.Pod{}},
|
||||
"replicaset": {&apps.ReplicaSet{}},
|
||||
},
|
||||
"pods": {
|
||||
"commands": {&api.Pod{}},
|
||||
"init-containers": {&api.Pod{}},
|
||||
|
||||
Reference in New Issue
Block a user