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

repositories:
- name: bitnami
  url: https://charts.bitnami.com/bitnami


commonLabels:
  tier: oceanbox

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