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

repositories:
- name: ingress-nginx
  url: 'https://kubernetes.github.io/ingress-nginx'

commonLabels:
  tier: system

releases:
- name: ingress-nginx
  namespace: ingress-nginx
  chart: ingress-nginx/ingress-nginx
  version: 4.8.3
  condition: nginx.enabled
  values:
  - ../values/ingress-nginx/values/ingress-nginx.yaml.gotmpl
  - ../values/ingress-nginx/values/ingress-nginx-{{ .Environment.Name }}.yaml.gotmpl
  postRenderer: ../bin/kustomizer
  postRendererArgs:
  - ../values/ingress-nginx/kustomize/{{ .Environment.Name }}
  missingFileHandler: Info
- name: manifests
  namespace: ingress-nginx
  chart: manifests
  condition: nginx.enabled
  missingFileHandler: Info
  values:
  - ../values/env.yaml
  - ../values/env-{{ requiredEnv "ARGOCD_ENV_CLUSTER_NAME" }}.yaml
  - ../values/ingress-nginx/env.yaml.gotmpl
  - ../values/ingress-nginx/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/ingress-nginx/manifests
    - manifests
