Allow missing keys in templates by default

Switch to allowing missing keys in jsonpath templates by default.

Add support for allowing/disallowing missing keys in go templates
(default=allow).

Add --allow-missing-template-keys flag to control this behavior
(default=true / allow missing keys).
This commit is contained in:
Andy Goldstein
2017-01-05 15:29:44 -05:00
parent 5503e5e6be
commit 80c5cd8b88
7 changed files with 104 additions and 14 deletions

View File

@@ -91,7 +91,7 @@ func dumpClusterInfo(f cmdutil.Factory, cmd *cobra.Command, args []string, out i
return err
}
printer, _, err := kubectl.GetPrinter("json", "", false)
printer, _, err := kubectl.GetPrinter("json", "", false, true)
if err != nil {
return err
}