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

commonLabels:
  tier: system

releases:
- name: grafana-pdc-agent
  namespace: prometheus
  chart: _grafana-pdc-agent
  missingFileHandler: Info
  values:
  - ../values/env.yaml
  - ../values/env-{{ requiredEnv "ARGOCD_ENV_CLUSTER_NAME" }}.yaml
  - ../values/grafana-pdc-agent/env.yaml.gotmpl
  - ../values/grafana-pdc-agent/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/grafana-pdc-agent/manifests
    - _grafana-pdc-agent
