helmDefaults:
 wait: true
 timeout: 600

missingFileHandler: Error

releases:
  - name: mailu
    namespace: smtp-server
    chart: mailu
    missingFileHandler: Warn
    wait: true
    values:
      - "values.yaml"
      - "values.gotmpl"
    hooks:
    - events:
      - presync
      showlogs: true
      command: bash
      args:
        - -c
        - 'oc get namespace {{`{{ .Release.Namespace }}`}} >/dev/null 2>&1 || oc create namespace {{`{{ .Release.Namespace }}`}}'
    - events:
      - presync
      showlogs: true
      command: oc
      args:
        - adm
        - policy
        - add-scc-to-user
        - anyuid
        - -z
        - '{{`{{ .Release.Name }}`}}'
        - -n
        - '{{`{{ .Release.Namespace }}`}}'
    - events:
      - presync
      showlogs: true
      command: oc
      args:
        - adm
        - policy
        - add-scc-to-user
        - privileged
        - -z
        - '{{`{{ .Release.Name }}`}}'
        - -n
        - '{{`{{ .Release.Namespace }}`}}'
    - events:
      - postuninstall
      showlogs: true
      command: oc
      args:
        - adm
        - policy
        - remove-scc-from-user
        - anyuid
        - -z
        - '{{`{{ .Release.Name }}`}}'
        - -n
        - '{{`{{ .Release.Namespace }}`}}'
    - events:
      - postuninstall
      showlogs: true
      command: oc
      args:
        - adm
        - policy
        - remove-scc-from-user
        - privileged
        - -z
        - '{{`{{ .Release.Name }}`}}'
        - -n
        - '{{`{{ .Release.Namespace }}`}}'
