# Default values for limesurvey.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# -- (int) Numbers of replicas
replicaCount: 1

image:
  # -- The docker image repository to use
  repository: adamzammit/limesurvey
  # -- The docker image pull policy
  pullPolicy: IfNotPresent
  # -- The docker image tag to use
  # @default -- vhart appVersion
  tag: ""

imagePullSecrets: []
# -- String to override the default generated name
nameOverride: ""
# -- String to override the default generated fullname
fullnameOverride: ""

deployment: {}

serviceAccount:
  # -- Specifies whether a service account should be created
  create: true
  # -- Annotations to add to the service account
  annotations: {}
  # -- The name of the service account to use.
  # If not set and create is true, a name is generated using the fullname template
  name: ""

# -- Annotations for the pods
podAnnotations: {}

podSecurityContext: {}
  # fsGroup: 2000

securityContext: {}
  # capabilities:
  #   drop:
  #   - ALL
  # runAsNonRoot: true
  # readOnlyRootFilesystem: true
  # runAsUser: 1000

service:
  # -- Specifies what type of Service should be created
  type: ClusterIP
  # -- Default Service port
  port: 80

ingress:
  enabled: true
  className: ""
  annotations: {}
    # kubernetes.io/ingress.class: nginx
    # kubernetes.io/tls-acme: "true"
  hostname: limesurvey-genes.lab.groupe-genes.fr
  # -- Ingress tls
  tls: []
  #  - secretName: chart-example-tls
  #    hosts:
  #      - chart-example.local

limesurvey:
  admin:
    # -- The full name of the Limesurvey administrator
    name: Lime Administrator
    # -- The email address of the Limesurvey administrator
    email: lime@lime.lime
    # -- The username of the Limesurvey administrator)
    username: admin
    # -- The password of the Limesurvey administrator
    password: "admin"
    # -- Use existing secret (admin.password will be ignored).
    # secret must contain the key limesurvey-admin-password
    existingSecret: ""
  smtp:
    # -- set the SMTP host - you can also specify a different port than 25 by using this format: [hostname:port], e.g. "smtp.example.com:587")
    host: ""
    # -- only set this if your server requires authorization - if you set it you HAVE to set a password too
    user: ""
    # -- SMTP authorization password - empty password is not allowed
    password: ""
    # -- Use existing secret (smtp.password will be ignored).
    # secret must contain the key limesurvey-smtp-password
    existingSecret: ""
    # -- set this to "ssl" to use SSL/TLS or "tls" to use StartTLS for SMTP connection
    ssl: ""
    # -- The email address where messages will be sent from
    from_email: your-email@example.net
    # -- set this to any value to enable SMTP debug mode
    debug: ""

  # -- Set this to "myprefix_" if you want your table names to have the myprefix_
  tablePrefix: "lime_"
  # -- Debug level of Limesurvey, 0 is off, 1 for errors, 2 for strict PHP and to be able to edit standard templates
  debug: "0"
  # -- Debug level of Limesurvey for SQL, 0 is off, 1 is on - note requires LIMESURVEY_DEBUG set to 2
  sqlDebug: "0"
  # -- Leave blank or don't set to use standard MyISAM database. Set to any value to use InnoDB
  useInnodb: "true"
  # -- Leave blank or don't set to use file based sessions. Set to any value to use DB based sessions
  dbSessions: ""
  # -- Leave blank or don't set to show the script name `index.php` in URLs. Set to any value to omit the script name
  dontShowScriptName: ""
  # -- Time zone name. If set, will configure PHP and LimeSurvey to use this time zone
  tz: "Europe/Berlin"


  livenessProbe:
    enabled: true
  readinessProbe:
    enabled: true

persistence:
  # -- Enable persistence using Persistent Volume Claims
  # ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
  enabled: true
  storageClass: null
  accessModes:
    - ReadWriteOnce
  size: 5Gi
  annotations:
    helm.sh/resource-policy: "keep"
  finalizers:
    - kubernetes.io/pvc-protection
  selectorLabels: {}
  existingClaim: null

# -- This allows you to mount additional volumes
# into the Limesurvey container
extraVolumeMounts: []
# - name: extra-volume-0
#   mountPath: /mnt/volume0
#   readOnly: true
#   existingClaim: volume-claim
# - name: extra-volume-1
#   mountPath: /mnt/volume1
#   readOnly: true
#   hostPath: /usr/shared/
# - name: extra-volume-configmap
#   configMap: limesurvey
#   items:
#   - key: config.php
#     path: application/config/config.php

# -- This allows you to mount additional "emptyDirs"
# into the Limesurvey container
extraEmptyDirMounts: []
# - name: extra-empty-dir
#   mountPath: /var/lib/foobar

# MariaDB chart configuration
# ref: https://github.com/bitnami/charts/tree/main/bitnami/mariadb
mariadb:
  # -- Deploy a MariaDB server
  enabled: true
  auth:
    database: limesurvey
    username: limesurvey
    password: changeme
    # -- Use existing secret (auth.rootPassword, auth.password, and auth.replicationPassword will be ignored).
    # secret must contain the keys mariadb-root-password, mariadb-replication-password and mariadb-password
    existingSecret: ""

  architecture: standalone

  primary:
    persistence:
      # -- Enable persistence using Persistent Volume Claims
      # ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
      enabled: true
      # -- Use an existing Persistent Volume Claim (must be created ahead of time)
      # existingClaim: ""
      # storageClass: ""
      accessMode: ReadWriteOnce
      size: 8Gi
    # -- Set container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if primary.resources is set (primary.resources is recommended for production).
    # More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
    resourcesPreset: "none"

## -- Use an externally provisioned database instance
## Ignored when mariadb.enabled is set to true
externalDatabase:
  # -- Type of external database ("mysql" or "pgsql")
  type: mysql
  # -- External Database server host
  host: mariadb.example.com
  # -- External Database server port
  port: 3306
  # -- External Database username
  username: limesurvey
  # -- External Database user password
  password: ""
  # -- External Database database name
  database: limesurvey
  # -- Use an existing secret for retrieving the database password.
  # The secret must contain the field "mariadb-password"
  existingSecret: ""

# -- Set the resources requests and limits
resources: {}
  # We usually recommend not to specify default resources and to leave this as a conscious
  # choice for the user. This also increases chances charts run on environments with little
  # resources, such as Minikube. If you do want to specify resources, uncomment the following
  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
  # limits:
  #   cpu: 100m
  #   memory: 128Mi
  # requests:
  #   cpu: 100m
  #   memory: 128Mi

autoscaling:
  enabled: false
  minReplicas: 1
  maxReplicas: 100
  targetCPUUtilizationPercentage: 80
  # targetMemoryUtilizationPercentage: 80

# -- Set the node selector for the pod.
nodeSelector: {}

# -- Set the tolerations for the pod.
tolerations: []

# -- Set the affinity for the pod.
affinity: {}
