1
0
mirror of synced 2026-03-25 19:36:56 +00:00

Refactor cmd global variables into structs

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
Somtochi Onyekwere
2021-01-21 11:59:05 +01:00
parent 77db369213
commit a7586e69fd
77 changed files with 1008 additions and 918 deletions

View File

@@ -80,7 +80,7 @@ func createImageUpdateRun(cmd *cobra.Command, args []string) error {
var update = autov1.ImageUpdateAutomation{
ObjectMeta: metav1.ObjectMeta{
Name: objectName,
Namespace: namespace,
Namespace: rootArgs.namespace,
Labels: labels,
},
Spec: autov1.ImageUpdateAutomationSpec{
@@ -90,7 +90,7 @@ func createImageUpdateRun(cmd *cobra.Command, args []string) error {
},
Branch: imageUpdateArgs.branch,
},
Interval: metav1.Duration{Duration: interval},
Interval: metav1.Duration{Duration: createArgs.interval},
Update: autov1.UpdateStrategy{
Setters: &autov1.SettersStrategy{},
},
@@ -102,7 +102,7 @@ func createImageUpdateRun(cmd *cobra.Command, args []string) error {
},
}
if export {
if createArgs.export {
return printExport(exportImageUpdate(&update))
}