From 694157c7b2b9d9e64daf1f011020cfd944760658 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Tue, 12 May 2026 18:10:19 +0200 Subject: [PATCH] Update argocd to v3.3.9 --- go.mod | 2 +- go.sum | 8 ++++---- .../apis/application/v1alpha1/application_defaults.go | 3 +++ .../github.com/argoproj/argo-cd/v3/util/git/client.go | 2 +- .../github.com/argoproj/argo-cd/v3/util/helm/client.go | 2 ++ vendor/github.com/argoproj/argo-cd/v3/util/helm/cmd.go | 8 ++++++-- .../github.com/argoproj/argo-cd/v3/util/helm/helm.go | 7 ++++--- .../github.com/argoproj/argo-cd/v3/util/oci/client.go | 10 ++++------ vendor/modules.txt | 2 +- 9 files changed, 26 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index e57c8e6a3..6785c5fac 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,7 @@ require ( ) require ( - github.com/argoproj/argo-cd/v3 v3.3.6 + github.com/argoproj/argo-cd/v3 v3.3.9 sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20250308055145-5fe7bb3edc86 sigs.k8s.io/controller-tools v0.16.4 ) diff --git a/go.sum b/go.sum index 56be3df45..dc53d34cc 100644 --- a/go.sum +++ b/go.sum @@ -45,8 +45,8 @@ github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFI github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/argoproj-labs/argocd-operator v0.15.0 h1:7zSjRchKUBCGBpz4v1pJ/Igmgn5blXorTxW0Ch9hWZ0= github.com/argoproj-labs/argocd-operator v0.15.0/go.mod h1:5jApqvt/B2NpI2fFEa7g/8TGUvnesspv86yu1E4hVUI= -github.com/argoproj/argo-cd/v3 v3.3.6 h1:eaWeTkM5EdDHSD3seySuxmbBY38UHjZfRJUPRBccGcY= -github.com/argoproj/argo-cd/v3 v3.3.6/go.mod h1:jNt8U5uib3bZWtKc4c0L9OsvgkYVOA0HtcRppVcp1oM= +github.com/argoproj/argo-cd/v3 v3.3.9 h1:5etMk6bD18iIiSeRo/5zTsp6Bwn6heoVeHIeA3++SSI= +github.com/argoproj/argo-cd/v3 v3.3.9/go.mod h1:Qh80AE4vFLe5jhdI7qYareRc7YOTLDQsDEq7ghvs0Qc= github.com/argoproj/gitops-engine v0.7.1-0.20250908182407-97ad5b59a627 h1:yntvA+uaFz62HRfWGGwlvs4ErdxoLQjCpDXufdEt2FI= github.com/argoproj/gitops-engine v0.7.1-0.20250908182407-97ad5b59a627/go.mod h1:yJ3t/GRn9Gx2LEyMrh9X0roL7zzVlk3nvuJt6G1o6jI= github.com/argoproj/pkg v0.13.7-0.20250305113207-cbc37dc61de5 h1:YBoLSjpoaJXaXAldVvBRKJuOPvIXz9UOv6S96gMJM/Q= @@ -154,8 +154,8 @@ github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMj github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= github.com/go-git/go-git/v5 v5.19.0 h1:+WkVUQZSy/F1Gb13udrMKjIM2PrzsNfDKFSfo5tkMtc= github.com/go-git/go-git/v5 v5.19.0/go.mod h1:Pb1v0c7/g8aGQJwx9Us09W85yGoyvSwuhEGMH7zjDKQ= -github.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs= -github.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= +github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA= +github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= diff --git a/vendor/github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1/application_defaults.go b/vendor/github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1/application_defaults.go index 218b54856..31b03ed21 100644 --- a/vendor/github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1/application_defaults.go +++ b/vendor/github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1/application_defaults.go @@ -29,4 +29,7 @@ const ( // KubernetesInternalAPIServerAddr is address of the k8s API server when accessing internal to the cluster KubernetesInternalAPIServerAddr = "https://kubernetes.default.svc" + + // KubernetesInClusterName is the name of the local in-cluster cluster + KubernetesInClusterName = "in-cluster" ) diff --git a/vendor/github.com/argoproj/argo-cd/v3/util/git/client.go b/vendor/github.com/argoproj/argo-cd/v3/util/git/client.go index ed4629b68..b7284350d 100644 --- a/vendor/github.com/argoproj/argo-cd/v3/util/git/client.go +++ b/vendor/github.com/argoproj/argo-cd/v3/util/git/client.go @@ -1041,7 +1041,7 @@ func (m *nativeGitClient) CheckoutOrOrphan(branch string, submoduleEnabled bool) } // Make an empty initial commit. - out, err = m.runCmd(ctx, "commit", "--allow-empty", "-m", "Initial commit") + out, err = m.runCmd(ctx, "commit", "--allow-empty", "-m", "Initial commit for "+branch) if err != nil { return out, fmt.Errorf("failed to commit initial commit: %w", err) } diff --git a/vendor/github.com/argoproj/argo-cd/v3/util/helm/client.go b/vendor/github.com/argoproj/argo-cd/v3/util/helm/client.go index f91f615e4..1b319deae 100644 --- a/vendor/github.com/argoproj/argo-cd/v3/util/helm/client.go +++ b/vendor/github.com/argoproj/argo-cd/v3/util/helm/client.go @@ -335,6 +335,7 @@ func (c *nativeHelmChart) loadRepoIndex(ctx context.Context, maxIndexSize int64) Proxy: proxy.GetCallback(c.proxy, c.noProxy), TLSClientConfig: tlsConf, DisableKeepAlives: true, + ForceAttemptHTTP2: true, } client := http.Client{Transport: tr} resp, err := client.Do(req) @@ -452,6 +453,7 @@ func (c *nativeHelmChart) GetTags(chart string, noCache bool) ([]string, error) Proxy: proxy.GetCallback(c.proxy, c.noProxy), TLSClientConfig: tlsConf, DisableKeepAlives: true, + ForceAttemptHTTP2: true, }} repoHost, _, _ := strings.Cut(tagsURL, "/") diff --git a/vendor/github.com/argoproj/argo-cd/v3/util/helm/cmd.go b/vendor/github.com/argoproj/argo-cd/v3/util/helm/cmd.go index 2ad981065..7a1e9f03c 100644 --- a/vendor/github.com/argoproj/argo-cd/v3/util/helm/cmd.go +++ b/vendor/github.com/argoproj/argo-cd/v3/util/helm/cmd.go @@ -327,8 +327,12 @@ func (c *Cmd) PullOCI(repo string, chart string, version string, destination str return out, nil } -func (c *Cmd) dependencyBuild() (string, error) { - out, _, err := c.run(context.Background(), "dependency", "build") +func (c *Cmd) dependencyBuild(insecure bool) (string, error) { + args := []string{"dependency", "build"} + if insecure { + args = append(args, "--insecure-skip-tls-verify") + } + out, _, err := c.run(context.Background(), args...) if err != nil { return "", fmt.Errorf("failed to build dependencies: %w", err) } diff --git a/vendor/github.com/argoproj/argo-cd/v3/util/helm/helm.go b/vendor/github.com/argoproj/argo-cd/v3/util/helm/helm.go index ef8d2fa89..f9980c844 100644 --- a/vendor/github.com/argoproj/argo-cd/v3/util/helm/helm.go +++ b/vendor/github.com/argoproj/argo-cd/v3/util/helm/helm.go @@ -43,20 +43,21 @@ type Helm interface { } // NewHelmApp create a new wrapper to run commands on the `helm` command-line tool. -func NewHelmApp(workDir string, repos []HelmRepository, isLocal bool, version string, proxy string, noProxy string, passCredentials bool) (Helm, error) { +func NewHelmApp(workDir string, repos []HelmRepository, isLocal bool, version string, proxy string, noProxy string, passCredentials bool, insecure bool) (Helm, error) { cmd, err := NewCmd(workDir, version, proxy, noProxy) if err != nil { return nil, fmt.Errorf("failed to create new helm command: %w", err) } cmd.IsLocal = isLocal - return &helm{repos: repos, cmd: *cmd, passCredentials: passCredentials}, nil + return &helm{repos: repos, cmd: *cmd, passCredentials: passCredentials, insecure: insecure}, nil } type helm struct { cmd Cmd repos []HelmRepository passCredentials bool + insecure bool } var _ Helm = &helm{} @@ -108,7 +109,7 @@ func (h *helm) DependencyBuild() error { } } h.repos = nil - _, err := h.cmd.dependencyBuild() + _, err := h.cmd.dependencyBuild(h.insecure) if err != nil { return fmt.Errorf("failed to build helm dependencies: %w", err) } diff --git a/vendor/github.com/argoproj/argo-cd/v3/util/oci/client.go b/vendor/github.com/argoproj/argo-cd/v3/util/oci/client.go index 256aab4a1..7dc65805f 100644 --- a/vendor/github.com/argoproj/argo-cd/v3/util/oci/client.go +++ b/vendor/github.com/argoproj/argo-cd/v3/util/oci/client.go @@ -143,6 +143,7 @@ func NewClientWithLock(repoURL string, creds Creds, repoLock sync.KeyLock, proxy Proxy: proxy.GetCallback(proxyURL, noProxy), TLSClientConfig: tlsConf, DisableKeepAlives: true, + ForceAttemptHTTP2: true, }, /* CheckRedirect: func(req *http.Request, via []*http.Request) error { @@ -365,11 +366,7 @@ func (c *nativeOCIClient) DigestMetadata(ctx context.Context, digest string) (*i } func (c *nativeOCIClient) digestMetadata(ctx context.Context, digest string) (*imagev1.Manifest, error) { - path, err := c.getCachedPath(digest) - if err != nil { - return nil, fmt.Errorf("error fetching oci metadata path for digest %s: %w", digest, err) - } - return getOCIManifestFromCache(ctx, path, digest) + return getOCIManifest(ctx, digest, c.repo) } func (c *nativeOCIClient) ResolveRevision(ctx context.Context, revision string, noCache bool) (string, error) { @@ -689,13 +686,14 @@ func (s *compressedLayerExtracterStore) Push(ctx context.Context, desc imagev1.D func getOCIManifest(ctx context.Context, digest string, repo oras.ReadOnlyTarget) (*imagev1.Manifest, error) { desc, err := repo.Resolve(ctx, digest) if err != nil { - return nil, fmt.Errorf("error resolving oci repo from digest, %w", err) + return nil, fmt.Errorf("error resolving oci manifest for digest %s: %w", digest, err) } rc, err := repo.Fetch(ctx, desc) if err != nil { return nil, fmt.Errorf("error fetching oci manifest for digest %s: %w", digest, err) } + defer rc.Close() manifest := imagev1.Manifest{} decoder := json.NewDecoder(rc) diff --git a/vendor/modules.txt b/vendor/modules.txt index 6ce9db513..8f1712218 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -129,7 +129,7 @@ github.com/ProtonMail/go-crypto/openpgp/x448 ## explicit; go 1.24.6 github.com/argoproj-labs/argocd-operator/api/v1beta1 github.com/argoproj-labs/argocd-operator/common -# github.com/argoproj/argo-cd/v3 v3.3.6 +# github.com/argoproj/argo-cd/v3 v3.3.9 ## explicit; go 1.25.5 github.com/argoproj/argo-cd/v3/assets github.com/argoproj/argo-cd/v3/common