From e0b766ee4617075467c0747878332d6eebbf048c Mon Sep 17 00:00:00 2001 From: Phillip Wittrock Date: Thu, 2 Jan 2020 15:36:54 -0800 Subject: [PATCH] Fix issue with setting `set-by` --- cmd/config/internal/commands/cmdset.go | 4 ++++ kyaml/setters/dokio.go | 1 + 2 files changed, 5 insertions(+) diff --git a/cmd/config/internal/commands/cmdset.go b/cmd/config/internal/commands/cmdset.go index d2ef769fc..914db5d54 100644 --- a/cmd/config/internal/commands/cmdset.go +++ b/cmd/config/internal/commands/cmdset.go @@ -27,6 +27,10 @@ func NewSetRunner(parent string) *SetRunner { } fixDocs(parent, c) r.Command = c + c.Flags().StringVar(&r.Perform.SetBy, "set-by", "", + "annotate the field with who set it") + c.Flags().StringVar(&r.Perform.Description, "description", "", + "annotate the field with a description of its value") return r } diff --git a/kyaml/setters/dokio.go b/kyaml/setters/dokio.go index 32b9a8f9d..47f808ad4 100644 --- a/kyaml/setters/dokio.go +++ b/kyaml/setters/dokio.go @@ -34,6 +34,7 @@ func (s *PerformSetters) Filter(input []*yaml.RNode) ([]*yaml.RNode, error) { Name: s.Name, Value: s.Value, Description: s.Description, + SetBy: s.SetBy, } if err := input[i].PipeE(p); err != nil { return nil, err