Improve DNS documentation (#6479)
This commit is contained in:
@@ -32,6 +32,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||
"k8s.io/apimachinery/pkg/util/yaml"
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
"k8s.io/kubernetes/pkg/api/testapi"
|
||||
"k8s.io/kubernetes/pkg/apis/apps"
|
||||
apps_validation "k8s.io/kubernetes/pkg/apis/apps/validation"
|
||||
@@ -53,6 +54,8 @@ import (
|
||||
)
|
||||
|
||||
func validateObject(obj runtime.Object) (errors field.ErrorList) {
|
||||
// Enable CustomPodDNS for testing
|
||||
utilfeature.DefaultFeatureGate.Set("CustomPodDNS=true")
|
||||
switch t := obj.(type) {
|
||||
case *api.ReplicationController:
|
||||
if t.Namespace == "" {
|
||||
@@ -285,6 +288,7 @@ func TestExampleObjectSchemas(t *testing.T) {
|
||||
},
|
||||
"../docs/concepts/services-networking": {
|
||||
"curlpod": {&extensions.Deployment{}},
|
||||
"custom-dns": {&api.Pod{}},
|
||||
"hostaliases-pod": {&api.Pod{}},
|
||||
"ingress": {&extensions.Ingress{}},
|
||||
"nginx-secure-app": {&api.Service{}, &extensions.Deployment{}},
|
||||
|
||||
Reference in New Issue
Block a user