Adds zookeeper example (#1894)
* Initial commit * Adds section for cleanup Corrects some spelling errors decapitalizes liveness and readiness * Adds test for zookeeper example * Address enisoc review * Remove space between shell and raw annotation * Remove extranous inserted text * Remove fencing statement * Modify sentence for grammer * refocus to zookeeper with some loss of generality * Spelling, Grammar, DNS link * update to address foxish comments
This commit is contained in:
committed by
Anirudh Ramanathan
parent
681114409f
commit
e9cf14ffb4
@@ -38,6 +38,8 @@ import (
|
||||
"k8s.io/kubernetes/pkg/apis/extensions"
|
||||
expvalidation "k8s.io/kubernetes/pkg/apis/extensions/validation"
|
||||
"k8s.io/kubernetes/pkg/capabilities"
|
||||
"k8s.io/kubernetes/pkg/apis/policy"
|
||||
policyvalidation "k8s.io/kubernetes/pkg/apis/policy/validation"
|
||||
"k8s.io/kubernetes/pkg/registry/batch/job"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/types"
|
||||
@@ -147,6 +149,11 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
|
||||
t.Namespace = api.NamespaceDefault
|
||||
}
|
||||
errors = apps_validation.ValidateStatefulSet(t)
|
||||
case *policy.PodDisruptionBudget:
|
||||
if t.Namespace == "" {
|
||||
t.Namespace = api.NamespaceDefault
|
||||
}
|
||||
errors = policyvalidation.ValidatePodDisruptionBudget(t)
|
||||
default:
|
||||
errors = field.ErrorList{}
|
||||
errors = append(errors, field.InternalError(field.NewPath(""), fmt.Errorf("no validation defined for %#v", obj)))
|
||||
@@ -323,6 +330,7 @@ func TestExampleObjectSchemas(t *testing.T) {
|
||||
"mysql-configmap": {&api.ConfigMap{}},
|
||||
"mysql-statefulset": {&apps.StatefulSet{}},
|
||||
"web": {&api.Service{}, &apps.StatefulSet{}},
|
||||
"zookeeper": {&api.Service{}, &api.ConfigMap{}, &policy.PodDisruptionBudget{}, &apps.StatefulSet{}},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user