bases:
 - ../envs/environments.yaml.gotmpl

repositories:
  - name: nfs-provisioner
    url: 'https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/'

commonLabels:
  tier: system

releases:
- name: nfs-provisioner
  namespace: kube-system 
  chart: nfs-provisioner/nfs-subdir-external-provisioner
  version: 4.0.13
  condition: nfs_provisioner.enabled
  values:
  - ../values/nfs-provisioner/values/nfs-provisioner.yaml.gotmpl
  - ../values/nfs-provisioner/values/nfs-provisioner-{{ .Environment.Name }}.yaml.gotmpl
  postRenderer: ../bin/kustomizer
  postRendererArgs:
  - ../values/nfs-provisioner/kustomize/{{ .Environment.Name }}
  missingFileHandler: Info
- name: manifests
  namespace: kube-system 
  chart: manifests
  condition: nfs_provisioner.enabled
  missingFileHandler: Info
  values:
  - ../values/env.yaml
  - ../values/env-{{ requiredEnv "ARGOCD_ENV_CLUSTER_NAME" }}.yaml
  - ../values/nfs-provisioner/env.yaml.gotmpl
  - ../values/nfs-provisioner/env-{{ requiredEnv "ARGOCD_ENV_CLUSTER_NAME" }}.yaml.gotmpl
  hooks:
  - events: [ prepare, cleanup ]
    showlogs: true
    command: ../bin/helmify
    args:
    - '{{`{{ if eq .Event.Name "prepare" }}build{{ else }}clean{{ end }}`}}'
    - '{{`{{ .Release.Chart }}`}}'
    - '{{`{{ .Environment.Name }}`}}'
    - ../values/nfs-provisioner/manifests
    - manifests
