replicaCount: 1

image:
  repository: git.oceanbox.io/oceanbox/poseidon/sorcerer
  tag: v1.46.2

podAnnotations:
  dapr.io/enabled: "true"
  dapr.io/app-id: "beta-sorcerer"
  dapr.io/app-port: "8085"
  dapr.io/api-token-secret: "dapr-api-token"
  dapr.io/config: "tracing"
  dapr.io/app-protocol: "http"
  dapr.io/log-as-json: "true"
  dapr.io/sidecar-cpu-request: "10m"
  dapr.io/sidecar-memory-request: "50Mi"
  # dapr.io/sidecar-cpu-limit: "300m"
  # dapr.io/sidecar-memory-limit: "1000Mi"

env:
  - name: APP_VERSION
    value: "4.16.3-beta"
  - name: LOG_LEVEL
    value: "1"
  - name: REDIS_USER
    value: default
  - name: REDIS_PASSWORD
    valueFrom:
      secretKeyRef:
        name: beta-sorcerer-redis
        key: redis-password
  - name: DAPR_API_TOKEN
    valueFrom:
      secretKeyRef:
        name: dapr-api-token
        key: token

ingress:
  enabled: true
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-production
    nginx.ingress.kubernetes.io/affinity: "cookie"
    nginx.ingress.kubernetes.io/session-cookie-name: "http-affinity"
    nginx.ingress.kubernetes.io/session-cookie-expires: "86400"
    nginx.ingress.kubernetes.io/session-cookie-max-age: "86400"
  hosts:
    - host: sorcerer.beta.ekman.oceanbox.io
      paths:
        - path: /
          pathType: ImplementationSpecific
      internal:
        - path: /internal
          pathType: ImplementationSpecific
        - path: /dapr
          pathType: ImplementationSpecific
        - path: /actors
          pathType: ImplementationSpecific
        - path: /job
          pathType: ImplementationSpecific
        - path: /events
          pathType: ImplementationSpecific
        - path: /metrics
          pathType: ImplementationSpecific
  tls:
    - hosts:
        - sorcerer.beta.ekman.oceanbox.io
      secretName: beta-sorcerer-tls

persistence:
  enabled: true
  existingClaim: beta-sorcerer-ceph-archives

redis:
  enabled: true
  size: 1Gi
  storageClass: "ceph-rbd"
  backup:
    enabled: true
  secret:
    name: "beta-sorcerer-redis"
    key: "redis-password"
  resources:
    cpu: 200m
    memory: 256Mi

affinity:
  nodeAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      nodeSelectorTerms:
        - matchExpressions:
            - key: "topology.kubernetes.io/group"
              operator: In
              values:
                - srv
  podAntiAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchExpressions:
            - key: "app.kubernetes.io/name"
              operator: In
              values:
                - sorcerer
            - key: "app.kubernetes.io/instance"
              operator: In
              values:
                - beta-sorcerer
        topologyKey: "kubernetes.io/hostname"

diagrid-dashboard:
  enabled: false
  statestore:
    scope: beta-sorcerer
    redis: beta-sorcerer-redis
