diff --git a/cmd/argocd-application-controller/commands/argocd_application_controller.go b/cmd/argocd-application-controller/commands/argocd_application_controller.go index 730ce69d67b6a..8c16d1b52634f 100644 --- a/cmd/argocd-application-controller/commands/argocd_application_controller.go +++ b/cmd/argocd-application-controller/commands/argocd_application_controller.go @@ -3,12 +3,20 @@ package commands import ( "context" "fmt" - "github.com/argoproj/argo-cd/v2/util/settings" + "math" + "time" + flag "github.com/spf13/pflag" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" - "math" - "time" + + "github.com/argoproj/argo-cd/v2/util/settings" + + "github.com/argoproj/pkg/stats" + "github.com/redis/go-redis/v9" + log "github.com/sirupsen/logrus" + "github.com/spf13/cobra" + "k8s.io/client-go/kubernetes" cmdutil "github.com/argoproj/argo-cd/v2/cmd/util" "github.com/argoproj/argo-cd/v2/common" @@ -27,11 +35,6 @@ import ( kubeutil "github.com/argoproj/argo-cd/v2/util/kube" "github.com/argoproj/argo-cd/v2/util/tls" "github.com/argoproj/argo-cd/v2/util/trace" - "github.com/argoproj/pkg/stats" - "github.com/redis/go-redis/v9" - log "github.com/sirupsen/logrus" - "github.com/spf13/cobra" - "k8s.io/client-go/kubernetes" ) const ( @@ -93,8 +96,6 @@ func (c *ApplicationControllerConfig) WithDefaultFlags() *ApplicationControllerC c.flags.IntVar(&c.repoServerTimeoutSeconds, "repo-server-timeout-seconds", env.ParseNumFromEnv("ARGOCD_APPLICATION_CONTROLLER_REPO_SERVER_TIMEOUT_SECONDS", 60, 0, math.MaxInt64), "Repo server RPC call timeout seconds.") c.flags.IntVar(&c.statusProcessors, "status-processors", env.ParseNumFromEnv("ARGOCD_APPLICATION_CONTROLLER_STATUS_PROCESSORS", 20, 0, math.MaxInt32), "Number of application status processors") c.flags.IntVar(&c.operationProcessors, "operation-processors", env.ParseNumFromEnv("ARGOCD_APPLICATION_CONTROLLER_OPERATION_PROCESSORS", 10, 0, math.MaxInt32), "Number of application operation processors") - c.flags.StringVar(&cmdutil.LogFormat, "logformat", env.StringFromEnv("ARGOCD_APPLICATION_CONTROLLER_LOGFORMAT", "text"), "Set the logging format. One of: text|json") - c.flags.StringVar(&cmdutil.LogLevel, "loglevel", env.StringFromEnv("ARGOCD_APPLICATION_CONTROLLER_LOGLEVEL", "info"), "Set the logging level. One of: debug|info|warn|error") c.flags.IntVar(&c.glogLevel, "gloglevel", 0, "Set the glog logging level") c.flags.IntVar(&c.metricsPort, "metrics-port", common.DefaultPortArgoCDMetrics, "Start metrics server on given port") c.flags.DurationVar(&c.metricsCacheExpiration, "metrics-cache-expiration", env.ParseDurationFromEnv("ARGOCD_APPLICATION_CONTROLLER_METRICS_CACHE_EXPIRATION", 0*time.Second, 0, math.MaxInt64), "Prometheus metrics cache expiration (disabled by default. e.g. 24h0m0s)") @@ -109,10 +110,10 @@ func (c *ApplicationControllerConfig) WithDefaultFlags() *ApplicationControllerC c.flags.StringSliceVar(&c.otlpAttrs, "otlp-attrs", env.StringsFromEnv("ARGOCD_APPLICATION_CONTROLLER_OTLP_ATTRS", []string{}, ","), "List of OpenTelemetry collector extra attrs when send traces, each attribute is separated by a colon(e.g. key:value)") c.flags.StringSliceVar(&c.applicationNamespaces, "application-namespaces", env.StringsFromEnv("ARGOCD_APPLICATION_NAMESPACES", []string{}, ","), "List of additional namespaces that applications are allowed to be reconciled from") c.flags.BoolVar(&c.persistResourceHealth, "persist-resource-health", env.ParseBoolFromEnv("ARGOCD_APPLICATION_CONTROLLER_PERSIST_RESOURCE_HEALTH", true), "Enables storing the managed resources health in the Application CRD") - c.flags.StringVar(&c.shardingAlgorithm, "sharding-method", env.StringFromEnv(common.EnvControllerShardingAlgorithm, common.DefaultShardingAlgorithm), "Enables choice of sharding method. Supported sharding methods are : [legacy, round-robin] ") + c.flags.StringVar(&c.shardingAlgorithm, "sharding-method", env.StringFromEnv(common.EnvControllerShardingAlgorithm, common.DefaultShardingAlgorithm), "Enables choice of sharding method. Supported sharding methods are : [legacy, round-robin, consistent-hashing] ") // global queue rate limit config c.flags.Int64Var(&c.workqueueRateLimit.BucketSize, "wq-bucket-size", env.ParseInt64FromEnv("WORKQUEUE_BUCKET_SIZE", 500, 1, math.MaxInt64), "Set Workqueue Rate Limiter Bucket Size, default 500") - c.flags.Float64Var(&c.workqueueRateLimit.BucketQPS, "wq-bucket-qps", env.ParseFloat64FromEnv("WORKQUEUE_BUCKET_QPS", math.MaxFloat64, 1, math.MaxFloat64), "Set Workqueue Rate Limiter Bucket QPS, default c.flags to MaxFloat64 which disables the bucket limiter") + c.flags.Float64Var(&c.workqueueRateLimit.BucketQPS, "wq-bucket-qps", env.ParseFloat64FromEnv("WORKQUEUE_BUCKET_QPS", math.MaxFloat64, 1, math.MaxFloat64), "Set Workqueue Rate Limiter Bucket QPS, default set to MaxFloat64 which disables the bucket limiter") // individual item rate limit config // when WORKQUEUE_FAILURE_COOLDOWN is 0 per item rate limiting is disabled(default) c.flags.DurationVar(&c.workqueueRateLimit.FailureCoolDown, "wq-cooldown-ns", time.Duration(env.ParseInt64FromEnv("WORKQUEUE_FAILURE_COOLDOWN_NS", 0, 0, (24*time.Hour).Nanoseconds())), "Set Workqueue Per Item Rate Limiter Cooldown duration in ns, default 0(per item rate limiter disabled)") @@ -121,6 +122,7 @@ func (c *ApplicationControllerConfig) WithDefaultFlags() *ApplicationControllerC c.flags.Float64Var(&c.workqueueRateLimit.BackoffFactor, "wq-backoff-factor", env.ParseFloat64FromEnv("WORKQUEUE_BACKOFF_FACTOR", 1.5, 0, math.MaxFloat64), "Set Workqueue Per Item Rate Limiter Backoff Factor, default is 1.5") c.flags.BoolVar(&c.enableDynamicClusterDistribution, "dynamic-cluster-distribution-enabled", env.ParseBoolFromEnv(common.EnvEnableDynamicClusterDistribution, false), "Enables dynamic cluster distribution.") c.flags.BoolVar(&c.serverSideDiff, "server-side-diff-enabled", env.ParseBoolFromEnv(common.EnvServerSideDiff, false), "Feature flag to enable ServerSide diff. Default (\"false\")") + c.flags.DurationVar(&c.ignoreNormalizerOpts.JQExecutionTimeout, "ignore-normalizer-jq-execution-timeout-seconds", env.ParseDurationFromEnv("ARGOCD_IGNORE_NORMALIZER_JQ_TIMEOUT", 0*time.Second, 0, math.MaxInt64), "Set ignore normalizer JQ execution timeout") c.cacheSource = appstatecache.AddCacheFlagsToCmd(c.flags, cacheutil.Options{ OnClientCreated: func(client *redis.Client) { c.redisClient = client @@ -258,7 +260,7 @@ func (c *ApplicationControllerConfig) CreateApplicationController(ctx context.Co func NewCommand() *cobra.Command { var config *ApplicationControllerConfig - var command = cobra.Command{ + command := cobra.Command{ Use: cliName, Short: "Run ArgoCD Application Controller", Long: "ArgoCD application controller is a Kubernetes controller that continuously monitors running applications and compares the current, live state against the desired target state (as specified in the repo). This command runs Application Controller in the foreground. It can be configured by following options.", @@ -277,5 +279,7 @@ func NewCommand() *cobra.Command { } config = NewApplicationControllerConfig(command.Flags(), command.PersistentFlags()).WithDefaultFlags().WithKubectlFlags() + command.Flags().StringVar(&cmdutil.LogFormat, "logformat", env.StringFromEnv("ARGOCD_APPLICATION_CONTROLLER_LOGFORMAT", "text"), "Set the logging format. One of: text|json") + command.Flags().StringVar(&cmdutil.LogLevel, "loglevel", env.StringFromEnv("ARGOCD_APPLICATION_CONTROLLER_LOGLEVEL", "info"), "Set the logging level. One of: debug|info|warn|error") return &command } diff --git a/cmd/argocd-applicationset-controller/commands/applicationset_controller.go b/cmd/argocd-applicationset-controller/commands/applicationset_controller.go index f009c514687e1..ba9484f97a296 100644 --- a/cmd/argocd-applicationset-controller/commands/applicationset_controller.go +++ b/cmd/argocd-applicationset-controller/commands/applicationset_controller.go @@ -3,14 +3,17 @@ package command import ( "context" "fmt" - "github.com/argoproj/argo-cd/v2/reposerver/apiclient" - "github.com/argoproj/argo-cd/v2/util/tls" - flag "github.com/spf13/pflag" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/rest" "math" "net/http" "os" + + flag "github.com/spf13/pflag" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/rest" + + "github.com/argoproj/argo-cd/v2/reposerver/apiclient" + "github.com/argoproj/argo-cd/v2/util/tls" + ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/manager" @@ -155,7 +158,7 @@ func (c *ApplicationSetControllerConfig) CreateApplicationSetController(ctx cont } // By default, watch all namespaces - var watchedNamespace = "" + watchedNamespace := "" // If the applicationset-namespaces contains only one namespace it corresponds to the current namespace if len(c.applicationSetNamespaces) == 1 { diff --git a/cmd/argocd-repo-server/commands/argocd_repo_server.go b/cmd/argocd-repo-server/commands/argocd_repo_server.go index 0cd1547f5246e..937a4a9d0c3dd 100644 --- a/cmd/argocd-repo-server/commands/argocd_repo_server.go +++ b/cmd/argocd-repo-server/commands/argocd_repo_server.go @@ -3,12 +3,13 @@ package commands import ( "context" "fmt" - flag "github.com/spf13/pflag" "math" "net" "net/http" "time" + flag "github.com/spf13/pflag" + "github.com/argoproj/pkg/stats" "github.com/redis/go-redis/v9" log "github.com/sirupsen/logrus" @@ -52,7 +53,6 @@ type RepoServerConfig struct { otlpHeaders map[string]string otlpAttrs []string cacheSrc func() (*reposervercache.Cache, error) - tlsConfigCustomizer tls.ConfigCustomizer tlsConfigCustomizerSrc func() (tls.ConfigCustomizer, error) redisClient *redis.Client disableTLS bool @@ -70,7 +70,7 @@ type RepoServerConfig struct { pauseGenerationOnFailureForMinutes int pauseGenerationOnFailureForRequests int gitSubmoduleEnabled bool - includeHiddenDirectories bool + includeHiddenDirectories bool } func NewRepoServerConfig(flags *flag.FlagSet) *RepoServerConfig { @@ -238,7 +238,7 @@ func (c *RepoServerConfig) CreateRepoServer(ctx context.Context) error { func NewCommand() *cobra.Command { var config *RepoServerConfig - var command = cobra.Command{ + command := cobra.Command{ Use: cliName, Short: "Run ArgoCD Repository Server", Long: "ArgoCD Repository Server is an internal service which maintains a local cache of the Git repository holding the application manifests, and is responsible for generating and returning the Kubernetes manifests. This command runs Repository Server in the foreground. It can be configured by following options.", diff --git a/cmd/argocd-server/commands/argocd_server.go b/cmd/argocd-server/commands/argocd_server.go index e03bc4b8cd46d..cb8437ef45054 100644 --- a/cmd/argocd-server/commands/argocd_server.go +++ b/cmd/argocd-server/commands/argocd_server.go @@ -3,13 +3,15 @@ package commands import ( "context" "fmt" - cacheutil "github.com/argoproj/argo-cd/v2/util/cache" - flag "github.com/spf13/pflag" - "k8s.io/client-go/rest" "math" "strings" "time" + flag "github.com/spf13/pflag" + "k8s.io/client-go/rest" + + cacheutil "github.com/argoproj/argo-cd/v2/util/cache" + "github.com/argoproj/pkg/stats" "github.com/redis/go-redis/v9" log "github.com/sirupsen/logrus" @@ -128,6 +130,7 @@ func (c *ServerConfig) WithDefaultFlags() *ServerConfig { c.flags.BoolVar(&c.dexServerStrictTLS, "dex-server-strict-tls", env.ParseBoolFromEnv("ARGOCD_SERVER_DEX_SERVER_STRICT_TLS", false), "Perform strict validation of TLS certificates when connecting to dex server") c.flags.StringSliceVar(&c.applicationNamespaces, "application-namespaces", env.StringsFromEnv("ARGOCD_APPLICATION_NAMESPACES", []string{}, ","), "List of additional namespaces where application resources can be managed in") c.flags.BoolVar(&c.enableProxyExtension, "enable-proxy-extension", env.ParseBoolFromEnv("ARGOCD_SERVER_ENABLE_PROXY_EXTENSION", false), "Enable Proxy Extension feature") + c.flags.IntVar(&c.webhookParallelism, "webhook-parallelism-limit", env.ParseNumFromEnv("ARGOCD_SERVER_WEBHOOK_PARALLELISM_LIMIT", 50, 1, 1000), "Number of webhook requests processed concurrently") // Flags related to the applicationSet component. c.flags.StringVar(&c.scmRootCAPath, "appset-scm-root-ca-path", env.StringFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_SCM_ROOT_CA_PATH", ""), "Provide Root CA Path for self-signed TLS Certificates") @@ -319,7 +322,7 @@ func (c *ServerConfig) CreateServer(ctx context.Context) *server.ArgoCDServer { // NewCommand returns a new instance of an argocd command func NewCommand() *cobra.Command { var config *ServerConfig - var command = &cobra.Command{ + command := &cobra.Command{ Use: cliName, Short: "Run the ArgoCD API server", Long: "The API server is a gRPC/REST server which exposes the API consumed by the Web UI, CLI, and CI/CD systems. This command runs API server in the foreground. It can be configured by following options.", diff --git a/reposerver/cache/cache.go b/reposerver/cache/cache.go index 5d5948b8ad61a..2707a0dd88898 100644 --- a/reposerver/cache/cache.go +++ b/reposerver/cache/cache.go @@ -5,22 +5,24 @@ import ( "encoding/json" "errors" "fmt" - flag "github.com/spf13/pflag" "hash/fnv" "math" "sort" "strings" "time" + flag "github.com/spf13/pflag" + + "github.com/argoproj/gitops-engine/pkg/utils/text" + "github.com/go-git/go-git/v5/plumbing" + log "github.com/sirupsen/logrus" + appv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" "github.com/argoproj/argo-cd/v2/reposerver/apiclient" "github.com/argoproj/argo-cd/v2/util/argo" cacheutil "github.com/argoproj/argo-cd/v2/util/cache" "github.com/argoproj/argo-cd/v2/util/env" "github.com/argoproj/argo-cd/v2/util/hash" - "github.com/argoproj/gitops-engine/pkg/utils/text" - "github.com/go-git/go-git/v5/plumbing" - log "github.com/sirupsen/logrus" ) var ( diff --git a/server/cache/cache.go b/server/cache/cache.go index 929f0f2cafcf0..a4715d27af7dc 100644 --- a/server/cache/cache.go +++ b/server/cache/cache.go @@ -3,10 +3,11 @@ package cache import ( "context" "fmt" - flag "github.com/spf13/pflag" "math" "time" + flag "github.com/spf13/pflag" + appv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" cacheutil "github.com/argoproj/argo-cd/v2/util/cache" appstatecache "github.com/argoproj/argo-cd/v2/util/cache/appstate" diff --git a/server/server_norace_test.go b/server/server_norace_test.go index 287ddec692d34..940e3441d2950 100644 --- a/server/server_norace_test.go +++ b/server/server_norace_test.go @@ -38,7 +38,6 @@ func TestUserAgent(t *testing.T) { defer cancel() s.Init(ctx) go s.Run(ctx, lns, cancel, func() { - }) defer func() { time.Sleep(3 * time.Second) }() @@ -105,7 +104,6 @@ func Test_StaticHeaders(t *testing.T) { defer cancel() s.Init(ctx) go s.Run(ctx, lns, cancel, func() { - }) defer func() { time.Sleep(3 * time.Second) }() @@ -136,7 +134,6 @@ func Test_StaticHeaders(t *testing.T) { defer cancel() s.Init(ctx) go s.Run(ctx, lns, cancel, func() { - }) defer func() { time.Sleep(3 * time.Second) }() @@ -167,7 +164,6 @@ func Test_StaticHeaders(t *testing.T) { defer cancel() s.Init(ctx) go s.Run(ctx, lns, cancel, func() { - }) defer func() { time.Sleep(3 * time.Second) }() diff --git a/test/e2e/fixture/fixture.go b/test/e2e/fixture/fixture.go index 3305e49d02dfd..9da3c8a5ae6a8 100644 --- a/test/e2e/fixture/fixture.go +++ b/test/e2e/fixture/fixture.go @@ -5,27 +5,30 @@ import ( "context" goerrors "errors" "fmt" - appcontrollercommand "github.com/argoproj/argo-cd/v2/cmd/argocd-application-controller/commands" - appsetcontrollercommand "github.com/argoproj/argo-cd/v2/cmd/argocd-applicationset-controller/commands" - reposervercommand "github.com/argoproj/argo-cd/v2/cmd/argocd-repo-server/commands" - servercommand "github.com/argoproj/argo-cd/v2/cmd/argocd-server/commands" - "github.com/argoproj/argo-cd/v2/util/cli" - grpcutil "github.com/argoproj/argo-cd/v2/util/grpc" - "github.com/spf13/pflag" - "github.com/testcontainers/testcontainers-go" - "github.com/testcontainers/testcontainers-go/modules/k3s" - "github.com/testcontainers/testcontainers-go/modules/redis" - "github.com/testcontainers/testcontainers-go/wait" "os" "os/user" "path" "path/filepath" - ctrl "sigs.k8s.io/controller-runtime" "strconv" "strings" "testing" "time" + "github.com/spf13/pflag" + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/modules/k3s" + "github.com/testcontainers/testcontainers-go/modules/redis" + "github.com/testcontainers/testcontainers-go/wait" + + appcontrollercommand "github.com/argoproj/argo-cd/v2/cmd/argocd-application-controller/commands" + appsetcontrollercommand "github.com/argoproj/argo-cd/v2/cmd/argocd-applicationset-controller/commands" + reposervercommand "github.com/argoproj/argo-cd/v2/cmd/argocd-repo-server/commands" + servercommand "github.com/argoproj/argo-cd/v2/cmd/argocd-server/commands" + "github.com/argoproj/argo-cd/v2/util/cli" + grpcutil "github.com/argoproj/argo-cd/v2/util/grpc" + + ctrl "sigs.k8s.io/controller-runtime" + "github.com/argoproj/pkg/errors" jsonpatch "github.com/evanphx/json-patch" log "github.com/sirupsen/logrus" @@ -607,8 +610,7 @@ func WithTestData(testdata string) TestOption { } } -type testLogConsumer struct { -} +type testLogConsumer struct{} func (g *testLogConsumer) Accept(l testcontainers.Log) { log.Info(string(l.Content)) @@ -644,6 +646,7 @@ func initTestContainers(ctx context.Context) { }, Started: true, }) + CheckError(err) c, err := k3s.RunContainer(ctx, testcontainers.WithImage("rancher/k3s:v1.27.15-k3s1"), // TODO: env var k3s version @@ -674,7 +677,7 @@ func initTestContainers(ctx context.Context) { CheckError(err) kubeConfigPath := temp + "/kubeconfig.yaml" - CheckError(os.WriteFile(kubeConfigPath, kubeConfigYaml, 0666)) + CheckError(os.WriteFile(kubeConfigPath, kubeConfigYaml, 0o666)) CheckError(os.Setenv("REDIS_SERVER", endpoint)) CheckError(os.Setenv("KUBECONFIG", kubeConfigPath)) CheckError(os.Setenv("ARGOCD_FAKE_IN_CLUSTER", "true")) @@ -729,9 +732,9 @@ func initTestServices(ctx context.Context) { serverFlags := pflag.NewFlagSet("", pflag.PanicOnError) CheckError(serverFlags.Parse([]string{})) serverRestConfig := rest.CopyConfig(KubeConfig) - //serverRestConfig.Impersonate.UserName = fmt.Sprintf("system:serviceaccount:%s:argocd-server", TestNamespace()) + // serverRestConfig.Impersonate.UserName = fmt.Sprintf("system:serviceaccount:%s:argocd-server", TestNamespace()) serverConfig := servercommand.NewServerConfig(serverFlags, serverFlags).WithDefaultFlags().WithK8sSettings(TestNamespace(), serverRestConfig) - //CheckError(serverFlags.Set("loglevel", "debug")) + // CheckError(serverFlags.Set("loglevel", "debug")) CheckError(serverFlags.Set("insecure", "true")) CheckError(serverFlags.Set("port", strings.Split(apiServerAddress, ":")[1])) CheckError(serverFlags.Set("repo-server", "localhost:8081")) @@ -742,7 +745,7 @@ func initTestServices(ctx context.Context) { appControllerFlags := pflag.NewFlagSet("", pflag.PanicOnError) CheckError(appControllerFlags.Parse([]string{})) appRestConfig := rest.CopyConfig(KubeConfig) - //appRestConfig.Impersonate.UserName = fmt.Sprintf("system:serviceaccount:%s:argocd-application-controller", TestNamespace()) + // appRestConfig.Impersonate.UserName = fmt.Sprintf("system:serviceaccount:%s:argocd-application-controller", TestNamespace()) appControllerConfig := appcontrollercommand.NewApplicationControllerConfig(appControllerFlags, appControllerFlags).WithDefaultFlags().WithK8sSettings(TestNamespace(), appRestConfig) CheckError(appControllerFlags.Set("loglevel", "debug")) CheckError(appControllerFlags.Set("repo-server", "localhost:8081")) @@ -753,9 +756,9 @@ func initTestServices(ctx context.Context) { CheckError(appSetControllerFlags.Parse([]string{})) appsetRestConfig := rest.CopyConfig(KubeConfig) - //appsetRestConfig.Impersonate.UserName = fmt.Sprintf("system:serviceaccount:%s:argocd-applicationset-controller", TestNamespace()) + // appsetRestConfig.Impersonate.UserName = fmt.Sprintf("system:serviceaccount:%s:argocd-applicationset-controller", TestNamespace()) appSetControllerConfig := appsetcontrollercommand.NewApplicationSetControllerConfig(appSetControllerFlags, appSetControllerFlags).WithDefaultFlags().WithK8sSettings(TestNamespace(), appsetRestConfig) - //CheckError(appSetControllerFlags.Set("loglevel", "debug")) + // CheckError(appSetControllerFlags.Set("loglevel", "debug")) CheckError(appSetControllerFlags.Set("probe-addr", ":9999")) CheckError(appSetControllerFlags.Set("argocd-repo-server", "localhost:8081")) mgr, err := appSetControllerConfig.CreateApplicationSetController(ctx) diff --git a/util/cache/appstate/cache.go b/util/cache/appstate/cache.go index 188b8dbc06a70..f53df0e7fa523 100644 --- a/util/cache/appstate/cache.go +++ b/util/cache/appstate/cache.go @@ -3,10 +3,11 @@ package appstate import ( "context" "fmt" - flag "github.com/spf13/pflag" "sort" "time" + flag "github.com/spf13/pflag" + appv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" cacheutil "github.com/argoproj/argo-cd/v2/util/cache" "github.com/argoproj/argo-cd/v2/util/env" diff --git a/util/cache/cache.go b/util/cache/cache.go index 69562fdae069f..e177925eda828 100644 --- a/util/cache/cache.go +++ b/util/cache/cache.go @@ -5,12 +5,13 @@ import ( "crypto/tls" "crypto/x509" "fmt" - flag "github.com/spf13/pflag" "math" "os" "strings" "time" + flag "github.com/spf13/pflag" + "github.com/redis/go-redis/v9" log "github.com/sirupsen/logrus" diff --git a/util/tls/tls.go b/util/tls/tls.go index 4bf327142aa76..299695b0a508e 100644 --- a/util/tls/tls.go +++ b/util/tls/tls.go @@ -12,15 +12,17 @@ import ( "encoding/pem" "errors" "fmt" - "github.com/spf13/pflag" "math/big" "net" "os" "strings" "time" - "github.com/argoproj/argo-cd/v2/util/env" + "github.com/spf13/pflag" + log "github.com/sirupsen/logrus" + + "github.com/argoproj/argo-cd/v2/util/env" ) const (