Files
renovate/lib/modules/manager/argocd/__fixtures__/validApplication.yml
Aleksei Sviridkin 82c09baca6 feat(argocd): support OCI Helm charts without explicit chart field (#39149)
* fix(argocd): support OCI Helm charts without explicit chart field

Add OCI registry detection for ArgoCD Applications that specify
Helm charts via oci:// URL without an explicit chart field.

Previously, any repoURL containing :// (including oci://) would
be treated as a git repository when the chart field was absent,
causing "Failed to look up git-tags package" errors.

The fix checks for oci:// prefix before falling back to git-tags
datasource, ensuring proper docker datasource usage for OCI registries.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>

* test(argocd): remove duplicate test for OCI without chart field

The test case is already covered by the 'full test' which includes
all fixtures from validApplication.yml, including the new OCI chart
without explicit chart field.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>

---------

Signed-off-by: Aleksei Sviridkin <f@lex.la>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-10 08:25:03 +00:00

156 lines
3.4 KiB
YAML

---
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
source:
chart: kube-state-metrics
repoURL: https://prometheus-community.github.io/helm-charts
targetRevision: 2.4.1
---
# application with helm values
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
source:
chart: {{ .Values.chart }}
repoURL: {{ .Values.repoUrl}}
targetRevision: {{ .Values.targetRevision }}
---
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
source:
chart: traefik
helm:
values: |
traefik:
service:
spec:
loadBalancerIP: 1.2.3.4
repoURL: gs://helm-charts-internal
targetRevision: 0.0.2
---
# application with kustomize image overrides
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
source:
repoURL: https://git.example.com/foo/bar.git
targetRevision: v1.2.0
kustomize:
images:
- someImage=somecontainer.registry.io/someContainer:v2.3.4
- otherImage=othercontainer.registry.io/other/container@sha256:8be5de38826b494a8ad1565b8d1eb49183d736d0277a89191bd1100d78479a42
- notActuallyValidAndShouldBeIgnored
---
# malformed application as the source section is missing
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
target:
namespace: testing
---
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
source:
chart: some/image
repoURL: somecontainer.registry.io
targetRevision: 1.2.0
---
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
source:
chart: some/image2
repoURL: oci://somecontainer.registry.io
targetRevision: 1.3.0
---
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
source:
chart: some/image2
repoURL: somecontainer.registry.io:443
targetRevision: 1.3.0
---
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
source:
chart: some/image3
repoURL: somecontainer.registry.io:443/
targetRevision: 1.0.0
---
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
sources:
- chart: some/image3
repoURL: somecontainer.registry.io:443/
targetRevision: 1.0.0
- ref: root
repoURL: git@github.com:<redacted>
---
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
sources:
- ref: foo
repoURL: https://git.example.com/foo/bar.git
targetRevision: v1.2.0
- chart: some/image3
repoURL: somecontainer.registry.io:443/
targetRevision: 1.0.0
---
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
sources:
- ref: foo
repoURL: https://git.example.com/foo/bar.git
targetRevision: v1.2.0
path: bar
- chart: traefik
repoURL: gs://helm-charts-internal
targetRevision: 0.0.2
helm:
valueFiles:
- $foo/values.yaml
---
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
sources:
- ref: foo
repoURL: https://git.example.com/foo/bar.git
targetRevision: v1.2.0
path: bar
- chart: somechart
repoURL: https://foo.io/repo
targetRevision: 0.0.2
helm:
valueFiles:
- $foo/values.yaml
---
{{- if .Values.enabled }}
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
source:
chart: somechart
repoURL: https://git.example.com/foo/bar.git
targetRevision: 3.2.1
{{- end }}
---
# OCI Helm chart without explicit chart field
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
source:
repoURL: oci://somecontainer.registry.io/org/chart
targetRevision: 0.4.0
path: .