add secret flag to options

This commit is contained in:
xilabao
2017-02-25 23:40:50 +08:00
parent db65bed243
commit 131802a5cd
18 changed files with 60 additions and 31 deletions

View File

@@ -585,7 +585,7 @@ func createGeneratedObject(f cmdutil.Factory, cmd *cobra.Command, generator kube
return nil, "", nil, nil, err
}
if cmdutil.GetRecordFlag(cmd) || len(annotations[kubectl.ChangeCauseAnnotation]) > 0 {
if err := cmdutil.RecordChangeCause(obj, f.Command()); err != nil {
if err := cmdutil.RecordChangeCause(obj, f.Command(cmd, false)); err != nil {
return nil, "", nil, nil, err
}
}