kyaml setters: support full and partial field replacement

This commit is contained in:
Phillip Wittrock
2020-01-02 14:00:43 -08:00
parent 3577a7e174
commit ac9b0a3e9e
6 changed files with 76 additions and 34 deletions

View File

@@ -34,6 +34,8 @@ func NewCreateSetterRunner(parent string) *CreateSetterRunner {
"kind of the Resource on which to create the setter.")
set.Flags().StringVar(&r.Set.SetPartialField.Type, "type", "",
"valid OpenAPI field type -- e.g. integer,boolean,string.")
set.Flags().BoolVar(&r.Set.SetPartialField.Partial, "partial", false,
"create a partial setter for only part of the field value.")
fixDocs(parent, set)
set.MarkFlagRequired("type")
set.MarkFlagRequired("field")