Merge branch 'master' into release-1.9

This commit is contained in:
zacharysarah
2017-12-05 14:03:08 -06:00
34 changed files with 753 additions and 305 deletions
+11 -2
View File
@@ -202,6 +202,10 @@ func walkConfigFiles(inDir string, fn func(name, path string, data [][]byte)) er
if err != nil {
return err
}
// workaround for Jekyllr limit
if bytes.HasPrefix(data, []byte("---\n")) {
return fmt.Errorf("YAML file cannot start with \"---\", please remove the first line")
}
name := strings.TrimSuffix(file, ext)
var docs [][]byte
@@ -220,7 +224,10 @@ func walkConfigFiles(inDir string, fn func(name, path string, data [][]byte)) er
if err != nil {
return fmt.Errorf("%s: %v", path, err)
}
docs = append(docs, out)
// deal with "empty" document (e.g. pure comments)
if string(out) != "null" {
docs = append(docs, out)
}
}
} else {
docs = append(docs, data)
@@ -284,7 +291,9 @@ func TestExampleObjectSchemas(t *testing.T) {
"nginx-deployment": {&extensions.Deployment{}},
},
"../docs/concepts/policy": {
"psp": {&extensions.PodSecurityPolicy{}},
"privileged-psp": {&extensions.PodSecurityPolicy{}},
"restricted-psp": {&extensions.PodSecurityPolicy{}},
"example-psp": {&extensions.PodSecurityPolicy{}},
},
"../docs/concepts/services-networking": {
"curlpod": {&extensions.Deployment{}},