Merge pull request #34407 from brendandburns/kubectl-schema

Automatic merge from submit-queue

Add validation that detects repeated keys in the labels and annotations maps

Fixes #2965  (a nearly 2 year old feature request!)

@kubernetes/kubectl 

@eparis
This commit is contained in:
Kubernetes Submit Queue
2016-10-19 14:01:00 -07:00
committed by GitHub
12 changed files with 672 additions and 1 deletions

View File

@@ -759,10 +759,14 @@ func (f *factory) Validator(validate bool, cacheDir string) (validation.Schema,
if err != nil {
return nil, err
}
return &clientSwaggerSchema{
swaggerSchema := &clientSwaggerSchema{
c: restclient,
fedc: fedClient,
cacheDir: dir,
}
return validation.ConjunctiveSchema{
swaggerSchema,
validation.NoDoubleKeySchema{},
}, nil
}
return validation.NullSchema{}, nil