apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: camunda
  namespace: camunda
spec:
  dependsOn: []
  interval: 5m
  timeout: 15m
  postRenderers:
    - kustomize:
        patches:
          - target:
              group: apps
              version: v1
              kind: Deployment
              namespace: camunda
            patch: |-
              - op: add
                path: /spec/template/spec/nodeSelector
                value:
                  node.deckhouse.io/group: generic
              - op: add
                path: /spec/template/spec/tolerations
                value: []
          - target:
              group: apps
              version: v1
              kind: StatefulSet
              namespace: camunda
            patch: |-
              - op: add
                path: /spec/template/spec/nodeSelector
                value:
                  node.deckhouse.io/group: generic
              - op: add
                path: /spec/template/spec/tolerations
                value: []
          - target:
              group: batch
              version: v1
              kind: Job
              namespace: camunda
            patch: |-
              - op: add
                path: /spec/template/spec/nodeSelector
                value:
                  node.deckhouse.io/group: generic
              - op: add
                path: /spec/template/spec/tolerations
                value: []
          - target:
              group: apps
              version: v1
              kind: Deployment
              namespace: camunda
              name: camunda-connectors
            patch: |-
              - op: add
                path: /spec/template/spec/nodeSelector
                value:
                  node.deckhouse.io/group: generic
              - op: add
                path: /spec/template/spec/tolerations
                value: []
          - target:
              group: apps
              version: v1
              kind: Deployment
              namespace: camunda
              name: camunda-identity
            patch: |-
              - op: add
                path: /spec/template/spec/nodeSelector
                value:
                  node.deckhouse.io/group: generic
              - op: add
                path: /spec/template/spec/tolerations
                value: []
          - target:
              group: apps
              version: v1
              kind: Deployment
              namespace: camunda
              name: camunda-operate
            patch: |-
              - op: add
                path: /spec/template/spec/nodeSelector
                value:
                  node.deckhouse.io/group: generic
              - op: add
                path: /spec/template/spec/tolerations
                value: []
          - target:
              group: apps
              version: v1
              kind: Deployment
              namespace: camunda
              name: camunda-optimize
            patch: |-
              - op: add
                path: /spec/template/spec/nodeSelector
                value:
                  node.deckhouse.io/group: generic
              - op: add
                path: /spec/template/spec/tolerations
                value: []
          - target:
              group: apps
              version: v1
              kind: Deployment
              namespace: camunda
              name: camunda-tasklist
            patch: |-
              - op: add
                path: /spec/template/spec/nodeSelector
                value:
                  node.deckhouse.io/group: generic
              - op: add
                path: /spec/template/spec/tolerations
                value: []
          - target:
              group: apps
              version: v1
              kind: Deployment
              namespace: camunda
              name: camunda-zeebe-gateway
            patch: |-
              - op: add
                path: /spec/template/spec/nodeSelector
                value:
                  node.deckhouse.io/group: generic
              - op: add
                path: /spec/template/spec/tolerations
                value: []
          - target:
              group: apps
              version: v1
              kind: StatefulSet
              namespace: camunda
              name: camunda-zeebe
            patch: |-
              - op: add
                path: /spec/template/spec/nodeSelector
                value:
                  node.deckhouse.io/group: generic
              - op: add
                path: /spec/template/spec/tolerations
                value: []
  values:
    global:
      vault:
        enabled: true
        role: camunda
        authPath: auth/kubernetes
        secrets:
          postgresql:
            path: secrets/data/camunda/postgresql
            keys:
              password: identity-password
              postgresPassword: postgres-password
      image:
        pullSecrets:
          - name: regcred
      identity:
        auth:
          publicIssuerUrl: "https://camunda-keycloak.sarex-k8s.uralmine.com/auth/realms/camunda-platform"
          identity:
            redirectUrl: "https://camunda-identity.sarex-k8s.uralmine.com"
          operate:
            redirectUrl: "https://camunda-operate.sarex-k8s.uralmine.com"
          tasklist:
            redirectUrl: "https://camunda-tasklist.sarex-k8s.uralmine.com"
          optimize:
            redirectUrl: "https://camunda-optimize.sarex-k8s.uralmine.com"
          webModeler:
            redirectUrl: "https://camunda-web-modeler.contour.infra.sarex.tech"
          console:
            redirectUrl: "https://camunda-console.contour.infra.sarex.tech"
    identityPostgresql:
      enabled: false
      auth:
        usePasswordFiles: true
      primary:
        automountServiceAccountToken: true
        persistence:
          size: 10Gi
          storageClass: nfs01
    identityKeycloak:
      externalDatabase:
        host: 10.222.255.162
        port: 5432
        user: bn_keycloak
        database: bitnami_keycloak
        password: ""
        existingSecret: ""
        existingSecretPasswordKey: password
      postgresql:
        enabled: false
        auth:
          usePasswordFiles: true
        primary:
          automountServiceAccountToken: true
          persistence:
            size: 10Gi
            storageClass: nfs01
      vaultEnv:
        enabled: true
        role: camunda
        authPath: auth/kubernetes
        envFiles:
          KEYCLOAK_ADMIN_PASSWORD:
            path: secrets/data/camunda/keycloak-admin
            key: admin-password
          KEYCLOAK_PASSWORD:
            path: secrets/data/camunda/keycloak-admin
            key: admin-password
          KEYCLOAK_DATABASE_PASSWORD:
            path: secrets/data/camunda/postgresql
            key: keycloak-password
      global:
        storageClass: nfs01
      tolerations: []
    postgresql:
      auth:
        usePasswordFiles: true
      primary:
        automountServiceAccountToken: true
        persistence:
          size: 10Gi
          storageClass: nfs01
    elasticsearch:
      master:
        replicaCount: 1
        podAntiAffinityPreset: soft
        persistence:
          size: 10Gi
          storageClass: nfs01
        tolerations: []
      metrics:
        enabled: false
        serviceMonitor:
          enabled: false
        prometheusRule:
          enabled: false
        tolerations: []
    camundaCanary:
      enabled: false
    prometheusServiceMonitor:
      enabled: false
    console:
      image:
        pullSecrets:
          - name: regcred
      tolerations: []
    zeebe:
      clusterSize: "1"
      partitionCount: "1"
      replicationFactor: "1"
      pvcStorageClassName: nfs01
      image:
        pullSecrets:
          - name: regcred
      tolerations: []
    zeebeGateway:
      replicas: 1
      image:
        pullSecrets:
          - name: regcred
      tolerations: []
    identity:
      fullURL: "https://camunda-identity.sarex-k8s.uralmine.com"
      externalDatabase:
        enabled: true
        host: 10.222.255.162
        port: 5432
        username: identity
        database: identity
        password: ""
        existingSecret: ""
        existingSecretPasswordKey: password
      image:
        pullSecrets:
          - name: regcred
      tolerations: []
    operate:
      image:
        pullSecrets:
          - name: regcred
      serviceAccount:
        automountServiceAccountToken: true
      tolerations: []
    tasklist:
      image:
        pullSecrets:
          - name: regcred
      serviceAccount:
        automountServiceAccountToken: true
      tolerations: []
    optimize:
      image:
        pullSecrets:
          - name: regcred
      serviceAccount:
        automountServiceAccountToken: true
      tolerations: []
    executionIdentity:
      image:
        pullSecrets:
          - name: regcred
      tolerations: []
    webModeler:
      image:
        pullSecrets:
          - name: regcred
      restapi:
        tolerations: []
      webapp:
        tolerations: []
      websockets:
        tolerations: []
    connectors:
      image:
        pullSecrets:
          - name: regcred
      serviceAccount:
        automountServiceAccountToken: true
      tolerations: []
