set the default behavior for SecretGenerator and ConfigMapGenerator as create

This commit is contained in:
Jingfang Liu
2018-07-18 10:59:38 -07:00
parent 9645f397ef
commit 08bc8637c8
3 changed files with 7 additions and 2 deletions

View File

@@ -33,6 +33,9 @@ func newResourceFromConfigMap(l loader.Loader, cmArgs types.ConfigMapArgs) (*res
if err != nil {
return nil, err
}
if cmArgs.Behavior == "" {
cmArgs.Behavior = "create"
}
return resource.NewResourceWithBehavior(cm, resource.NewGenerationBehavior(cmArgs.Behavior))
}