helmDefaults:
  timeout: 600
missingFileHandler: Warn
repositories:
- name: hashicorp
  url: https://helm.releases.hashicorp.com
- name: bitnami
  url: https://charts.bitnami.com/bitnami
values:
- values.yaml
- values.gotmpl
releases:
- name: groupsync-operator
  namespace: group-sync-operator
  chart: groupsync-operator
  values:
  - values.gotmpl
  - values.yaml
  hooks:
  - events:
    - postsync
    showlogs: true
    command: bash
    args:
    - ../scripts/approveInstallPlan.sh
    - '{{`{{ .Values.globalEDPProject }}`}}'
    - '{{`{{ .Values.groupsync_operator_version }}`}}'
    - '{{`{{ .Release.Namespace }}`}}'
  labels: {}

- name: keycloak-groupsync
  namespace: group-sync-operator
  chart: keycloak-groupsync
  wait: true
  values:
  - values.gotmpl
  - values.yaml
  hooks:
  - events:
    - postsync
    command: bash
    args:
    - ../scripts/copy_keycloak_secret.sh
    - user-management
    - '{{`{{ .Release.Namespace }}`}}'
  needs:
  - group-sync-operator/groupsync-operator
  - user-management/keycloak
  labels: {}

- name: keycloak-operator-resources
  namespace: user-management
  chart: keycloak-operator-resources
  needs:
  - user-management/keycloak
  values:
  - values.yaml
  - values.gotmpl
  labels: {}

- name: keycloak-idps
  namespace: user-management
  chart: keycloak-idps
  needs:
  - user-management/keycloak
  - user-management/keycloak-operator-resources
  values:
  - values.yaml
  - values.gotmpl
  labels: {}
  hooks:
  - events:
    - presync
    showlogs: true
    command: bash
    args:
    - ../scripts/check_resource.sh
    - Secret
    - keycloak-client-openshift-secret
    - '{{`{{ .Release.Namespace }}`}}'

- name: keycloak
  namespace: user-management
  chart: '{{ env "CUSTOM_BASEDIR" | default "/opt" }}/repositories/components/infra/keycloak.git/deploy-templates'
  labels:
    type: remote
    update_scc: false
    isbranch: false
    stream: master
    path: components/infra/
    repoURL: ssh://jenkins@gerrit.mdtu-ddm-edp-cicd:32114/mdtu-ddm/devops/keycloak.git
  values:
  - values.yaml
  - values.gotmpl
  - image:
      name: '{{ env "edpComponentDockerRegistryUrl" }}/{{ env "globalEDPProject" }}/keycloak-master'
      version: 1.9.6.23
  version: 1.9.6.23
  hooks:
  - events:
    - presync
    showlogs: true
    command: oc
    args:
    - adm
    - policy
    - add-scc-to-user
    - anyuid
    - -z
    - keycloak
    - -n
    - '{{`{{ .Release.Namespace }}`}}'
  - events:
    - postuninstall
    showlogs: true
    command: oc
    args:
    - adm
    - policy
    - remove-scc-from-user
    - anyuid
    - -z
    - keycloak
    - -n
    - '{{`{{ .Release.Namespace }}`}}'

- name: keycloak-operator
  namespace: user-management
  chart: '{{ env "CUSTOM_BASEDIR" | default "/opt" }}/repositories/components/registry/keycloak-operator.git/deploy-templates'
  labels:
    repoURL: ssh://jenkins@gerrit.mdtu-ddm-edp-cicd:32114/mdtu-ddm/devops/operators/keycloak-operator.git
    update_scc: true
    type: remote
    path: components/registry/
  values:
  - values.yaml
  - values.gotmpl
  - operator:
      clusterRoleName: keycloak-operator-user-management-clusterrole
  version: 1.5.0-SNAPSHOT.77
  needs:
  - user-management/keycloak
  - user-management/keycloak-operator-resources
  hooks:
  - events:
    - postsync
    showlogs: true
    command: bash
    args:
    - -c
    - '{{`{{ if eq .Values.update_IDP "false"}}echo "IDP configuration skipped"{{
      else }}bash ../scripts/configure_openshift_IdP.sh {{ .Values.keycloak.url }}{{
      end }}`}}'

- name: keycloak-postgresql
  namespace: user-management
  chart: keycloak-postgresql
  labels: {}
  needs:
  - user-management/keycloak
  values:
  - values.yaml
  - values.gotmpl

- name: prometheus-postgres-exporter
  namespace: user-management
  chart: prometheus-postgres-exporter
  labels: {}
  needs:
  - user-management/keycloak
  - user-management/keycloak-postgresql
  values:
  - values.yaml
  - values.gotmpl

- name: digital-signature-ops
  namespace: user-management
  chart: '{{ env "CUSTOM_BASEDIR" | default "/opt" }}/repositories/components/registry/digital-signature-ops.git/deploy-templates'
  values:
  - values.yaml
  - values.gotmpl
  - image:
      name: '{{ env "edpComponentDockerRegistryUrl" }}/{{ env "globalEDPProject" }}/digital-signature-ops-master'
      version: 1.9.7.4
  version: 1.9.7.4
  missingFileHandler: Warn
  labels:
    type: remote
    update_scc: false
    isbranch: false
    stream: master
    path: components/registry/
    repoURL: ssh://jenkins@gerrit.mdtu-ddm-edp-cicd:32114/mdtu-ddm/low-code-platform/platform/backend/applications/digital-signature-ops.git

- name: hashicorp-vault
  namespace: user-management
  chart: '{{ env "CUSTOM_BASEDIR" | default "/opt" }}/repositories/components/registry/hashicorp-vault.git/deploy-templates'
  values:
  - values.yaml
  - values.gotmpl
  missingFileHandler: Warn
  version: 1.5.0-SNAPSHOT.79
  labels:
    type: remote
    update_scc: false
    isbranch: false
    path: components/registry/
    repoURL: ssh://jenkins@gerrit.mdtu-ddm-edp-cicd:32114/mdtu-ddm/devops/hashicorp-vault.git

- name: reloader
  chart: '{{ env "CUSTOM_BASEDIR" | default "/opt" }}/repositories/components/registry/reloader.git/deploy-templates'
  namespace: user-management
  labels:
    type: remote
    update_scc: false
    repoURL: ssh://jenkins@gerrit.mdtu-ddm-edp-cicd:32114/mdtu-ddm/devops/reloader.git
    path: components/registry/
  version: 1.9.6-SNAPSHOT.2
  values:
  - values.yaml
  - values.gotmpl
  - image:
      name: '{{ env "edpComponentDockerRegistryUrl" }}/{{ env "globalEDPProject" }}/reloader-master'
      version: 1.9.6-SNAPSHOT.1
  missingFileHandler: Warn


- name: keycloak-nginx-proxy
  namespace: user-management
  chart: keycloak-nginx-proxy
  missingFileHandler: Warn
  installed: false
  needs:
  - user-management/keycloak
  values:
  - values.gotmpl
  - values.yaml
  labels: {}
