docs-validation: update to handle workloads
@@ -30,6 +30,7 @@ var (
excludedTags = []string{
"plugin_dir", // deprecated
"runtimes", // printed as separate table
+ "workloads", // printed as separate table
"manage_network_ns_lifecycle", // deprecated
}
@@ -41,6 +42,11 @@ var (
"storage_driver", // user dependent
}
+ // Tags where it should not validate the values
+ excludedCLI = []string{
+ "workloads", // too complex an option for a CLI flag
+ }
+
// Mapping for inconsistencies between tags and CLI arguments
tagToCLIOption = map[string]string{
"network_dir": "cni-config-dir",
@@ -154,6 +160,11 @@ func validateCli(cfg *config.Config) (failed bool) {
cliOption = val
}
+ if stringInSlice(entry.tag, excludedCLI) {
+ logrus.Debugf("Skipping excluded CLI entry `%s`", entry.tag)
+ continue
+ }
+
// Lookup the tag
nameMatches := regexp.
MustCompile(`.*Name:\s+"(` + cliOption + `.*)",`).
