bases:
  - ../../common/environments.yaml
  - ../../common/templates.yaml

repositories:
  - name: bedag
    url: https://bedag.github.io/helm-charts/
  - name: metrics-server
    url: https://kubernetes-sigs.github.io/metrics-server/
  - name: jetstack
    url: https://charts.jetstack.io
  - name: metallb
    url: https://metallb.github.io/metallb
  - name: traefik
    url: https://traefik.github.io/charts
  - name: coredns
    url: https://coredns.github.io/helm
  - name: cilium
    url: https://helm.cilium.io/
  - name: piraeus-charts
    url: https://piraeus.io/helm-charts/
  - name: vmware-tanzu
    url: https://vmware-tanzu.github.io/helm-charts/
  - name: openebs
    url: https://openebs.github.io/openebs
  - name: local-path-provisioner
    url: git+https://github.com/rancher/local-path-provisioner@deploy/chart?ref=master
  - name: istio
    url: https://istio-release.storage.googleapis.com/charts

releases:
  - name: namespaces
    chart: '{{ requiredEnv "PWD" }}/charts/namespaces/chart'
    namespace: kube-public
    createNamespace: false
    inherit:
      - template: default-env-values

  - name: roles
    chart: '{{ requiredEnv "PWD" }}/charts/roles'
    namespace: kube-public
    createNamespace: false
    needs:
      - kube-public/namespaces
    inherit:
      - template: default-env-values

  - name: coredns
    chart: coredns/coredns
    version: 1.37.0
    namespace: kube-system
    inherit:
      - template: default-common-values

  - name: snapshot-controller
    chart: piraeus-charts/snapshot-controller
    installed: true
    version: 3.0.6
    namespace: kube-system
    condition: velero.enabled
    needs:
      - kube-system/cilium
    inherit:
      - template: crd-management-hook

  - name: cilium
    chart: cilium/cilium
    version: 1.16.4
    condition: base.enabled
    namespace: kube-system
    needs:
      - kube-system/coredns
    inherit:
      - template: default-env-values

  - name: cert-manager
    chart: jetstack/cert-manager
    version: v1.16.2
    namespace: kube-system
    condition: base.enabled
    missingFileHandler: Warn
    needs:
      - kube-system/cilium
    inherit:
      - template: default-common-values
      - template: default-env-values

  - name: issuer
    chart: '{{ requiredEnv "PWD" }}/charts/issuer'
    namespace: kube-public
    missingFileHandler: Warn
    condition: base.enabled
    needs:
      - kube-system/cert-manager
    inherit:
      - template: default-common-values
      - template: default-env-values

  - name: metrics-server
    chart: metrics-server/metrics-server
    version: 3.12.2
    namespace: kube-system
    needs:
      - kube-system/cilium
    inherit:
      - template: default-common-values

  - name: metallb
    chart: metallb/metallb
    namespace: kube-system
    condition: base.enabled
    version: 0.14.8
    needs:
      - kube-system/cilium
    inherit:
      - template: default-common-values

  - name: metallb-resources
    chart: bedag/raw
    version: 2.0.0
    condition: base.enabled
    namespace: kube-system
    needs:
      - kube-system/metallb
    inherit:
      - template: ext-metallb
      - template: default-env-values

  - name: traefik
    chart: traefik/traefik
    version: 33.1.0
    condition: base.enabled
    namespace: kube-system
    needs:
      - kube-system/cilium
    inherit:
      - template: default-common-values
      - template: default-env-values

  - name: velero
    chart: vmware-tanzu/velero
    namespace: kube-system
    version: 8.1.0
    condition: velero.enabled
    needs:
      - kube-system/cilium
    inherit:
      - template: default-env-values
      - template: default-env-secrets
      - template: crd-management-hook

  - name: openebs
    chart: openebs/openebs
    condition: openebs.enabled
    namespace: kube-system
    version: 4.1.1
    needs:
      - kube-system/cilium
    inherit:
      - template: default-env-values

  # -- Not versions since it's idnstalled from git
  - name: local-path-provisioner
    chart: local-path-provisioner/local-path-provisioner
    condition: localpath.enabled
    namespace: kube-system
    needs:
      - kube-system/cilium
    inherit:
      - template: default-env-values

  - name: istio-base
    chart: istio/base
    condition: istio.enabled
    namespace: istio-system
    inherit:
      - template: crd-management-hook

  - name: istio-ingressgateway
    chart: istio/gateway
    condition: istio.enabled
    namespace: istio-system
    needs:
      - istio-system/istio-base
    inherit:
      - template: default-env-values

  - name: istiod
    chart: istio/istiod
    condition: istio.enabled
    namespace: istio-system
    inherit:
      - template: default-env-values
    needs:
      - istio-system/istio-base