Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,16 @@ func newRunCommand() *cobra.Command {
},
}

runCmd.Flags().StringVar(&cfg.ApplicationsAPIKind, "applications-api", env.GetStringVal("APPLICATIONS_API", applicationsAPIKindK8S), "API kind that is used to manage Argo CD applications ('kubernetes' or 'argocd')")
runCmd.Flags().StringVar(&cfg.ClientOpts.ServerAddr, "argocd-server-addr", env.GetStringVal("ARGOCD_SERVER", ""), "address of ArgoCD API server")
runCmd.Flags().BoolVar(&cfg.ClientOpts.GRPCWeb, "argocd-grpc-web", env.GetBoolVal("ARGOCD_GRPC_WEB", false), "use grpc-web for connection to ArgoCD")
runCmd.Flags().BoolVar(&cfg.ClientOpts.Insecure, "argocd-insecure", env.GetBoolVal("ARGOCD_INSECURE", false), "(INSECURE) ignore invalid TLS certs for ArgoCD server")
runCmd.Flags().BoolVar(&cfg.ClientOpts.Plaintext, "argocd-plaintext", env.GetBoolVal("ARGOCD_PLAINTEXT", false), "(INSECURE) connect without TLS to ArgoCD server")
runCmd.Flags().StringVar(&cfg.ClientOpts.AuthToken, "argocd-auth-token", "", "use token for authenticating to ArgoCD (unsafe - consider setting ARGOCD_TOKEN env var instead)")
// DEPRECATED: These flags have been removed in the CRD branch and will be deprecated and removed in a future release.
// The CRD branch introduces a new architecture that eliminates the need for these native ArgoCD client configuration flags.
runCmd.Flags().StringVar(&cfg.ApplicationsAPIKind, "applications-api", env.GetStringVal("APPLICATIONS_API", applicationsAPIKindK8S), "API kind that is used to manage Argo CD applications ('kubernetes' or 'argocd'). DEPRECATED: this flag will be removed in a future version.")
runCmd.Flags().StringVar(&cfg.ClientOpts.ServerAddr, "argocd-server-addr", env.GetStringVal("ARGOCD_SERVER", ""), "address of ArgoCD API server. DEPRECATED: this flag will be removed in a future version.")
runCmd.Flags().BoolVar(&cfg.ClientOpts.GRPCWeb, "argocd-grpc-web", env.GetBoolVal("ARGOCD_GRPC_WEB", false), "use grpc-web for connection to ArgoCD. DEPRECATED: this flag will be removed in a future version.")
runCmd.Flags().BoolVar(&cfg.ClientOpts.Insecure, "argocd-insecure", env.GetBoolVal("ARGOCD_INSECURE", false), "(INSECURE) ignore invalid TLS certs for ArgoCD server. DEPRECATED: this flag will be removed in a future version.")
runCmd.Flags().BoolVar(&cfg.ClientOpts.Plaintext, "argocd-plaintext", env.GetBoolVal("ARGOCD_PLAINTEXT", false), "(INSECURE) connect without TLS to ArgoCD server. DEPRECATED: this flag will be removed in a future version.")
runCmd.Flags().StringVar(&cfg.ClientOpts.AuthToken, "argocd-auth-token", "", "use token for authenticating to ArgoCD (unsafe - consider setting ARGOCD_TOKEN env var instead). DEPRECATED: this flag will be removed in a future version.")
runCmd.Flags().BoolVar(&disableKubernetes, "disable-kubernetes", false, "do not create and use a Kubernetes client. DEPRECATED: this flag will be removed in a future version.")

runCmd.Flags().BoolVar(&cfg.DryRun, "dry-run", false, "run in dry-run mode. If set to true, do not perform any changes")
runCmd.Flags().DurationVar(&cfg.CheckInterval, "interval", env.GetDurationVal("IMAGE_UPDATER_INTERVAL", 2*time.Minute), "interval for how often to check for updates")
runCmd.Flags().StringVar(&cfg.LogLevel, "loglevel", env.GetStringVal("IMAGE_UPDATER_LOGLEVEL", "info"), "set the loglevel to one of trace|debug|info|warn|error")
Expand All @@ -323,12 +327,15 @@ func newRunCommand() *cobra.Command {
runCmd.Flags().IntVar(&cfg.MetricsPort, "metrics-port", 8081, "port to start the metrics server on, 0 to disable")
runCmd.Flags().BoolVar(&once, "once", false, "run only once, same as specifying --interval=0 and --health-port=0")
runCmd.Flags().StringVar(&cfg.RegistriesConf, "registries-conf-path", defaultRegistriesConfPath, "path to registries configuration file")
runCmd.Flags().BoolVar(&disableKubernetes, "disable-kubernetes", false, "do not create and use a Kubernetes client")
runCmd.Flags().IntVar(&cfg.MaxConcurrency, "max-concurrency", 10, "maximum number of update threads to run concurrently")
runCmd.Flags().StringVar(&cfg.ArgocdNamespace, "argocd-namespace", "", "namespace where ArgoCD runs in (current namespace by default)")
runCmd.Flags().StringVar(&cfg.AppNamespace, "application-namespace", v1.NamespaceAll, "namespace where Argo Image Updater will manage applications (all namespaces by default)")
runCmd.Flags().StringSliceVar(&cfg.AppNamePatterns, "match-application-name", nil, "patterns to match application name against")
runCmd.Flags().StringVar(&cfg.AppLabel, "match-application-label", "", "label selector to match application labels against")

// DEPRECATED: These flags have been removed in the CRD branch and will be deprecated and removed in a future release.
// The CRD branch introduces a new architecture that eliminates the need for these application matching flags.
runCmd.Flags().StringSliceVar(&cfg.AppNamePatterns, "match-application-name", nil, "patterns to match application name against. DEPRECATED: this flag will be removed in a future version.")
runCmd.Flags().StringVar(&cfg.AppLabel, "match-application-label", "", "label selector to match application labels against. DEPRECATED: this flag will be removed in a future version.")

runCmd.Flags().BoolVar(&warmUpCache, "warmup-cache", true, "whether to perform a cache warm-up on startup")
runCmd.Flags().StringVar(&cfg.GitCommitUser, "git-commit-user", env.GetStringVal("GIT_COMMIT_USER", "argocd-image-updater"), "Username to use for Git commits")
runCmd.Flags().StringVar(&cfg.GitCommitMail, "git-commit-email", env.GetStringVal("GIT_COMMIT_EMAIL", "[email protected]"), "E-Mail address to use for Git commits")
Expand Down
25 changes: 16 additions & 9 deletions cmd/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,22 +165,29 @@ Supported registries:
},
}

// DEPRECATED: These flags have been removed in the CRD branch and will be deprecated and removed in a future release.
// The CRD branch introduces a new architecture that eliminates the need for these native ArgoCD client configuration flags.
webhookCmd.Flags().StringVar(&cfg.ApplicationsAPIKind, "applications-api", env.GetStringVal("APPLICATIONS_API", applicationsAPIKindK8S), "API kind that is used to manage Argo CD applications ('kubernetes' or 'argocd'). DEPRECATED: this flag will be removed in a future version.")
webhookCmd.Flags().StringVar(&cfg.ClientOpts.ServerAddr, "argocd-server-addr", env.GetStringVal("ARGOCD_SERVER", ""), "address of ArgoCD API server. DEPRECATED: this flag will be removed in a future version.")
webhookCmd.Flags().BoolVar(&cfg.ClientOpts.GRPCWeb, "argocd-grpc-web", env.GetBoolVal("ARGOCD_GRPC_WEB", false), "use grpc-web for connection to ArgoCD. DEPRECATED: this flag will be removed in a future version.")
webhookCmd.Flags().BoolVar(&cfg.ClientOpts.Insecure, "argocd-insecure", env.GetBoolVal("ARGOCD_INSECURE", false), "(INSECURE) ignore invalid TLS certs for ArgoCD server. DEPRECATED: this flag will be removed in a future version.")
webhookCmd.Flags().BoolVar(&cfg.ClientOpts.Plaintext, "argocd-plaintext", env.GetBoolVal("ARGOCD_PLAINTEXT", false), "(INSECURE) connect without TLS to ArgoCD server. DEPRECATED: this flag will be removed in a future version.")
webhookCmd.Flags().StringVar(&cfg.ClientOpts.AuthToken, "argocd-auth-token", "", "use token for authenticating to ArgoCD (unsafe - consider setting ARGOCD_TOKEN env var instead). DEPRECATED: this flag will be removed in a future version.")
webhookCmd.Flags().BoolVar(&disableKubernetes, "disable-kubernetes", false, "do not create and use a Kubernetes client. DEPRECATED: this flag will be removed in a future version.")

// Set Image Updater flags
webhookCmd.Flags().StringVar(&cfg.ApplicationsAPIKind, "applications-api", env.GetStringVal("APPLICATIONS_API", applicationsAPIKindK8S), "API kind that is used to manage Argo CD applications ('kubernetes' or 'argocd')")
webhookCmd.Flags().StringVar(&cfg.ClientOpts.ServerAddr, "argocd-server-addr", env.GetStringVal("ARGOCD_SERVER", ""), "address of ArgoCD API server")
webhookCmd.Flags().BoolVar(&cfg.ClientOpts.GRPCWeb, "argocd-grpc-web", env.GetBoolVal("ARGOCD_GRPC_WEB", false), "use grpc-web for connection to ArgoCD")
webhookCmd.Flags().BoolVar(&cfg.ClientOpts.Insecure, "argocd-insecure", env.GetBoolVal("ARGOCD_INSECURE", false), "(INSECURE) ignore invalid TLS certs for ArgoCD server")
webhookCmd.Flags().BoolVar(&cfg.ClientOpts.Plaintext, "argocd-plaintext", env.GetBoolVal("ARGOCD_PLAINTEXT", false), "(INSECURE) connect without TLS to ArgoCD server")
webhookCmd.Flags().StringVar(&cfg.ClientOpts.AuthToken, "argocd-auth-token", "", "use token for authenticating to ArgoCD (unsafe - consider setting ARGOCD_TOKEN env var instead)")
webhookCmd.Flags().StringVar(&cfg.LogLevel, "loglevel", env.GetStringVal("IMAGE_UPDATER_LOGLEVEL", "info"), "set the loglevel to one of trace|debug|info|warn|error")
webhookCmd.Flags().StringVar(&kubeConfig, "kubeconfig", "", "full path to kubernetes client configuration, i.e. ~/.kube/config")
webhookCmd.Flags().StringVar(&cfg.RegistriesConf, "registries-conf-path", defaultRegistriesConfPath, "path to registries configuration file")
webhookCmd.Flags().BoolVar(&disableKubernetes, "disable-kubernetes", false, "do not create and use a Kubernetes client")
webhookCmd.Flags().IntVar(&cfg.MaxConcurrency, "max-concurrency", 10, "maximum number of update threads to run concurrently")
webhookCmd.Flags().StringVar(&cfg.ArgocdNamespace, "argocd-namespace", "", "namespace where ArgoCD runs in (current namespace by default)")
webhookCmd.Flags().StringVar(&cfg.AppNamespace, "application-namespace", v1.NamespaceAll, "namespace where Argo Image Updater will manage applications (all namespaces by default)")
webhookCmd.Flags().StringSliceVar(&cfg.AppNamePatterns, "match-application-name", nil, "patterns to match application name against")
webhookCmd.Flags().StringVar(&cfg.AppLabel, "match-application-label", "", "label selector to match application labels against")

// DEPRECATED: These flags have been removed in the CRD branch and will be deprecated and removed in a future release.
// The CRD branch introduces a new architecture that eliminates the need for these application matching flags.
webhookCmd.Flags().StringSliceVar(&cfg.AppNamePatterns, "match-application-name", nil, "patterns to match application name against. DEPRECATED: this flag will be removed in a future version.")
webhookCmd.Flags().StringVar(&cfg.AppLabel, "match-application-label", "", "label selector to match application labels against. DEPRECATED: this flag will be removed in a future version.")

webhookCmd.Flags().StringVar(&cfg.GitCommitUser, "git-commit-user", env.GetStringVal("GIT_COMMIT_USER", "argocd-image-updater"), "Username to use for Git commits")
webhookCmd.Flags().StringVar(&cfg.GitCommitMail, "git-commit-email", env.GetStringVal("GIT_COMMIT_EMAIL", "[email protected]"), "E-Mail address to use for Git commits")
webhookCmd.Flags().StringVar(&cfg.GitCommitSigningKey, "git-commit-signing-key", env.GetStringVal("GIT_COMMIT_SIGNING_KEY", ""), "GnuPG key ID or path to Private SSH Key used to sign the commits")
Expand Down
18 changes: 18 additions & 0 deletions docs/install/cmd/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ API kind that is used to manage Argo CD applications ('kubernetes' or 'argocd')

Can also be set using the *APPLICATIONS_API* environment variable.

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for this native ArgoCD client configuration flag.

**--argocd-auth-token *token***

Use *token* for authenticating to the Argo CD API. This token must be a base64
encoded JWT, as generated by Argo CD.

The token can also be set using the *ARGOCD_TOKEN* environment variable.

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for this native ArgoCD client configuration flag.

**--argocd-grpc-web**

If this flag is given, use the gRPC-web protocol to connect to the Argo CD API.
Expand All @@ -35,6 +39,8 @@ HTTP/2, or only accept HTTP/2 on the front end.

Can also be set using the *ARGOCD_GRPC_WEB* environment variable.

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for this native ArgoCD client configuration flag.

**--argocd-insecure**

If specified, the certificate of the Argo CD API server is not verified. Useful
Expand All @@ -44,6 +50,8 @@ production systems.

Can also be set using the *ARGOCD_INSECURE* environment variable.

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for this native ArgoCD client configuration flag.

**-argocd-namespace *namespace***

namespace where ArgoCD runs in (current namespace by default)
Expand All @@ -55,6 +63,8 @@ TLS.

Can also be set using the *ARGOCD_PLAINTEXT* environment variable.

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for this native ArgoCD client configuration flag.

**--argocd-server-addr *server address***

Connect to the Argo CD API server at *server address*. *server address* must
Expand All @@ -65,6 +75,8 @@ connections, and port 443 for TLS connections.

Can also be set using the *ARGOCD_SERVER* environment variable.

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for this native ArgoCD client configuration flag.

**--disable-kube-events**

Disable kubernetes events
Expand All @@ -78,6 +90,8 @@ cluster, this flag will prevent Argo CD Image Updater from creating a client
to interact with Kubernetes. When Kubernetes access is disabled, pull secrets
for images can only be specified from an environment variable.

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for this native ArgoCD client configuration flag.

**--dry-run**

If this flag is set, Argo CD Image Updater won't actually perform any changes
Expand Down Expand Up @@ -192,6 +206,8 @@ currently does not support pattern matching on label values (e.g `customer.label
You can specify equality, inequality, or set based requirements or a combination.
For e.g., `app,app!=foo,custom.label/name=xyz,customer in (a,b,c)`

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for these application matching flag.

**--match-application-name *pattern***

Only process applications that have a valid annotation and matches the given
Expand All @@ -200,6 +216,8 @@ style wildcards, i.e. `*-staging` would match any application name with a
suffix of `-staging`. Can be specified multiple times to define more than
one pattern, from which at least one has to match.

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for these application matching flag.

**--max-concurrency *number***

Process a maximum of *number* applications concurrently. To disable concurrent
Expand Down
18 changes: 18 additions & 0 deletions docs/install/cmd/webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ API kind that is used to manage Argo CD applications ('kubernetes' or 'argocd')

Can also be set using the *APPLICATIONS_API* environment variable.

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for this native ArgoCD client configuration flag.

**--argocd-auth-token *token***

Use *token* for authenticating to the Argo CD API. This token must be a base64
encoded JWT, as generated by Argo CD.

The token can also be set using the *ARGOCD_TOKEN* environment variable.

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for this native ArgoCD client configuration flag.

**--argocd-grpc-web**

If this flag is given, use the gRPC-web protocol to connect to the Argo CD API.
Expand All @@ -42,6 +46,8 @@ HTTP/2, or only accept HTTP/2 on the front end.

Can also be set using the *ARGOCD_GRPC_WEB* environment variable.

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for this native ArgoCD client configuration flag.

**--argocd-insecure**

If specified, the certificate of the Argo CD API server is not verified. Useful
Expand All @@ -51,6 +57,8 @@ production systems.

Can also be set using the *ARGOCD_INSECURE* environment variable.

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for this native ArgoCD client configuration flag.

**-argocd-namespace *namespace***

namespace where ArgoCD runs in (current namespace by default)
Expand All @@ -62,6 +70,8 @@ TLS.

Can also be set using the *ARGOCD_PLAINTEXT* environment variable.

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for this native ArgoCD client configuration flag.

**--argocd-server-addr *server address***

Connect to the Argo CD API server at *server address*. *server address* must
Expand All @@ -72,6 +82,8 @@ connections, and port 443 for TLS connections.

Can also be set using the *ARGOCD_SERVER* environment variable.

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for this native ArgoCD client configuration flag.

**--disable-kube-events**

Disable kubernetes events
Expand All @@ -85,6 +97,8 @@ cluster, this flag will prevent Argo CD Image Updater from creating a client
to interact with Kubernetes. When Kubernetes access is disabled, pull secrets
for images can only be specified from an environment variable.

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for this native ArgoCD client configuration flag.

**--docker-webhook-secret *secret***

Secret for validating Docker Hub webhooks.
Expand Down Expand Up @@ -164,6 +178,8 @@ currently does not support pattern matching on label values (e.g `customer.label
You can specify equality, inequality, or set based requirements or a combination.
For e.g., `app,app!=foo,custom.label/name=xyz,customer in (a,b,c)`

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for these application matching flag.

**--match-application-name *pattern***

Only process applications that have a valid annotation and matches the given
Expand All @@ -172,6 +188,8 @@ style wildcards, i.e. `*-staging` would match any application name with a
suffix of `-staging`. Can be specified multiple times to define more than
one pattern, from which at least one has to match.

**DEPRECATED:** This flag has been removed in the CRD branch and will be deprecated and removed in a future release. The CRD branch introduces a new architecture that eliminates the need for these application matching flag.

**--max-concurrency *number***

Process a maximum of *number* applications concurrently. To disable concurrent
Expand Down
Loading