# yaml-language-server: $schema=./values.schema.json
image:
  pullPolicy: IfNotPresent
  repository: docker.io/cloudreve/cloudreve
  tag: 4.15.0@sha256:a713a0421219af320e81f482c80a68576b049c39544df31734ffecdb8804f6da
workload:
  main:
    podSpec:
      containers:
        main:
          env:
            CR_CONF_Database.Type: postgres
            CR_CONF_Database.Host: "{{ .Values.cnpg.main.creds.host }}"
            CR_CONF_Database.User: "{{ .Values.cnpg.main.user }}"
            CR_CONF_Database.Name: "{{ .Values.cnpg.main.database }}"
            CR_CONF_Database.Password: "{{ .Values.cnpg.main.creds.password }}"
            CR_CONF_Database.Port: 5432
            CR_CONF_Redis.Server: '{{ .Values.redis.creds.plain | trimAll "\"" }}:6379'
            CR_CONF_Redis.User: "{{ .Values.redis.redisUsername }}"
            CR_CONF_Redis.Password: "{{ .Values.redis.creds.redisPassword }}"
persistence:
  config:
    enabled: true
    mountPath: "/cloudreve/data"
securityContext:
  container:
    readOnlyRootFilesystem: false
    runAsGroup: 0
    runAsUser: 0
service:
  main:
    ports:
      main:
        port: 5212
        targetPort: 5212
redis:
  enabled: true
  redisUsername: default
cnpg:
  main:
    enabled: true
    user: cloudreve
    database: cloudreve
