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

repositories:
- name: dapr
  url: https://dapr.github.io/helm-charts

commonLabels:
  tier: system

releases:
- name: manifests
  namespace: dapr-system
  chart: manifests
  condition: dapr.enabled
  missingFileHandler: Info
  values:
  - ../values/env.yaml
  - ../values/env-{{ requiredEnv "ARGOCD_ENV_CLUSTER_NAME" }}.yaml
  - ../values/dapr/env.yaml.gotmpl
  - ../values/dapr/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/dapr/manifests
    - manifests
