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

repositories:
- name: cilium
  url: 'https://helm.cilium.io'

commonLabels:
  tier: system

apiVersions:
- monitoring.coreos.com/v1

releases:
- name: cilium
  namespace: kube-system
  chart: cilium/cilium
  version: 1.16.2
  condition: cilium.enabled
  values:
  - ../values/cilium/values/cilium.yaml.gotmpl
  - ../values/cilium/values/cilium-{{ .Environment.Name }}.yaml.gotmpl
  missingFileHandler: Info
- name: manifests
  namespace: cilium
  chart: manifests
  condition: cilium.spire.enabled
  hooks:
  - events: [ prepare, cleanup ]
    showlogs: true
    command: ../bin/helmify
    args:
    - '{{`{{ if eq .Event.Name "prepare" }}build{{ else }}clean{{ end }}`}}'
    - '{{`{{ .Release.Chart }}`}}'
    - '{{`{{ .Environment.Name }}`}}'
    - ../values/cilium/spire-manifests
    - manifests
- name: manifests
  namespace: cilium
  chart: manifests
  condition: cilium.enabled
  missingFileHandler: Info
  values:
  - ../values/env.yaml
  - ../values/env-{{ requiredEnv "ARGOCD_ENV_CLUSTER_NAME" }}.yaml
  - ../values/cilium/env.yaml.gotmpl
  - ../values/cilium/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/cilium/cilium-manifests
    - manifests

