Skip to content

Commit 0965eaa

Browse files
committed
feat: Add run config for application namespace
Signed-off-by: Graham Beckley <gbeckley@mozilla.com>
1 parent 61ea007 commit 0965eaa

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

cmd/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ type ImageUpdaterConfig struct {
3131
ApplicationsAPIKind string
3232
ClientOpts argocd.ClientOptions
3333
ArgocdNamespace string
34+
AppNamespace string
3435
DryRun bool
3536
CheckInterval time.Duration
3637
ArgoClient argocd.ArgoCD

cmd/run.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import (
2424
"github.com/spf13/cobra"
2525

2626
"golang.org/x/sync/semaphore"
27+
28+
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2729
)
2830

2931
// newRunCommand implements "run" command
@@ -235,6 +237,7 @@ func newRunCommand() *cobra.Command {
235237
runCmd.Flags().BoolVar(&disableKubernetes, "disable-kubernetes", false, "do not create and use a Kubernetes client")
236238
runCmd.Flags().IntVar(&cfg.MaxConcurrency, "max-concurrency", 10, "maximum number of update threads to run concurrently")
237239
runCmd.Flags().StringVar(&cfg.ArgocdNamespace, "argocd-namespace", "", "namespace where ArgoCD runs in (current namespace by default)")
240+
runCmd.Flags().StringVar(&cfg.AppNamespace, "application-namespace", v1.NamespaceAll, "namespace where Argo Image Updater will manage applications (all namespaces by default)")
238241
runCmd.Flags().StringSliceVar(&cfg.AppNamePatterns, "match-application-name", nil, "patterns to match application name against")
239242
runCmd.Flags().StringVar(&cfg.AppLabel, "match-application-label", "", "label selector to match application labels against")
240243
runCmd.Flags().BoolVar(&warmUpCache, "warmup-cache", true, "whether to perform a cache warm-up on startup")

0 commit comments

Comments
 (0)