---
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 }}
