## Global Docker image parameters
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
## Current available global Docker image parameters: imageRegistry and imagePullSecrets
##
# global:
#   imageRegistry: myRegistryName
#   imagePullSecrets:
#     - myRegistryKeySecretName
#   storageClass: myStorageClass

## Bitnami Redmine image version
## ref: https://hub.docker.com/r/bitnami/redmine/tags/
##
image:
  registry: docker.io
  repository: bitnami/redmine
  tag: 4.1.1-debian-10-r133
  ## Specify a imagePullPolicy
  ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
  ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
  ##
  pullPolicy: IfNotPresent
  ## Optionally specify an array of imagePullSecrets.
  ## Secrets must be manually created in the namespace.
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
  ##
  # pullSecrets:
  #   - myRegistryKeySecretName

## String to partially override redmine.fullname template (will maintain the release name)
##
# nameOverride:

## String to fully override redmine.fullname template
##
# fullnameOverride:

## Update strategy for Deployments. Set to recreate if persistent volume cannot be mounted to move than one pod.
## Example:
## updateStrategy:
##  type: RollingUpdate
##  rollingUpdate:
##    maxSurge: 25%
##    maxUnavailable: 25%
##
updateStrategy:
  type: RollingUpdate

## User of the application
## ref: https://github.com/bitnami/bitnami-docker-redmine/#environment-variables
##
redmineUsername: user

## Application password
## Defaults to a random 10-character alphanumeric string if not set
## ref: https://github.com/bitnami/bitnami-docker-redmine#environment-variables
##
# redminePassword:

## Admin email
## ref: https://github.com/bitnami/bitnami-docker-redmine/#environment-variables
##
redmineEmail: user@example.com

## Redmine default data language
## ref: https://github.com/bitnami/bitnami-docker-redmine/#environment-variables
##
redmineLanguage: en

## SMTP mail delivery configuration
## ref: https://github.com/bitnami/bitnami-docker-redmine/#smtp-configuration
##
# smtpHost:
# smtpPort:
# smtpUser:
# smtpPassword:
# smtpTls:

## Use an existing secret with keys "redmine-password", "smtp-password" and "external-db-password" defined.
## This ignores redminePassword, smtpPassword and externalDatabase.password
# existingSecret:

## Environment variables, to pass to the entry point
##
# extraVars:
#   - name: NAMI_DEBUG
#     value: --log-level trace

## Define a disruption budget
## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
##
podDisruptionBudget:
  enabled: false
  # minAvailable: 1
  # maxUnavailable: 1

## Define the number of pods the deployment will create
## Do not change unless your persistent volume allows more than one writer, ie NFS
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
##
replicas: 1

## Redmine containers' resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
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: 2
  #  memory: 1Gi
  requests: {}
  #  cpu: 1
  #  memory: 1Gi

## Pods Service Account
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
##
serviceAccount:
  ## Specifies whether a ServiceAccount should be created
  ##
  create: true
  ## The name of the ServiceAccount to use.
  ## If not set and create is true, a name is generated using the redmine.fullname template
  # name:

## Pod Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
##
securityContext: {}

## Pod annotations
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
podAnnotations: {}

## Affinity for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
##
affinity: {}

## Node labels for pod assignment. Evaluated as a template.
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
##
nodeSelector: {}

## Tolerations for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
##
tolerations: []

## Configure extra options for liveness and readiness probes
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
##
livenessProbe:
  enabled: true
  initialDelaySeconds: 300
  periodSeconds: 10
  timeoutSeconds: 5
  successThreshold: 1
  failureThreshold: 3
readinessProbe:
  enabled: true
  initialDelaySeconds: 5
  periodSeconds: 10
  timeoutSeconds: 1
  successThreshold: 1
  failureThreshold: 3

## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
persistence:
  enabled: true
  ## A manually manage Persistent Volume Claim
  ## Requires persistence.enable: true
  ## If defined, PVC must be created manually before volume will be bound
  # existingClaim:

  ## redmine data Persistent Volume Storage Class
  ## If defined, storageClassName: <storageClass>
  ## If set to "-", storageClassName: "", which disables dynamic provisioning
  ## If undefined (the default) or set to null, no storageClassName spec is
  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
  ##   GKE, AWS & OpenStack)
  ##
  # storageClass: "-"
  accessMode: ReadWriteOnce
  size: 8Gi

## Database type. Allowed values: "mariadb" and "postgresql"
## ref: https://github.com/bitnami/bitnami-docker-redmine#run-the-application-using-postgresql-database
##
databaseType: mariadb

## MariaDB chart configuration
##
## https://github.com/bitnami/charts/blob/master/bitnami/mariadb/values.yaml
##
mariadb:
  ## Whether to deploy a mariadb server to satisfy the applications database requirements. To use an external database set this to false and configure the externalDatabase parameters
  enabled: true
  ## Disable MariaDB replication
  replication:
    enabled: false

  ## Use existing secret (ignores root, db and replication passwords)
  ##
  # existingSecret:

  ## Create a database and a database user
  ## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#creating-a-database-user-on-first-run
  ##
  db:
    name: bitnami_redmine
    user: bn_redmine
    ## If the password is not specified, mariadb will generate a random password
    ##
    # password:

  ## MariaDB admin password
  ## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#setting-the-root-password-on-first-run
  ##
  # rootUser:
  #   password:

  ## Enable persistence using Persistent Volume Claims
  ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
  ##
  master:
    persistence:
      enabled: true
      ## mariadb data Persistent Volume Storage Class
      ## If defined, storageClassName: <storageClass>
      ## If set to "-", storageClassName: "", which disables dynamic provisioning
      ## If undefined (the default) or set to null, no storageClassName spec is
      ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
      ##   GKE, AWS & OpenStack)
      ##
      # storageClass: "-"
      accessMode: ReadWriteOnce
      size: 8Gi

## PostgreSQL chart configuration
##
## https://github.com/bitnami/charts/blob/master/bitnami/postgresql/values.yaml
##
postgresql:
  ## Whether to deploy a PostgreSQL server to satisfy the applications database requirements. To use an external database set this to false and configure the externalDatabase parameters
  enabled: false

  ## Create a database and a database user
  ## ref: https://github.com/bitnami/bitnami-docker-postgresql/#creating-a-database-on-first-run
  ##
  postgresqlDatabase: bitnami_redmine
  postgresqlUsername: bn_redmine
  ##
  ## If the password is not specified, postgresql will generate a random password
  # postgresqlPassword:

  ## Enable persistence using Persistent Volume Claims
  ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
  ##
  persistence:
    enabled: true
    ## A manually manage Persistent Volume Claim
    ## Requires postgresql.persistence.enable: true
    ## If defined, PVC must be created manually before volume will be bound
    # existingClaim:

    ## postgresql data Persistent Volume Storage Class
    ## If defined, storageClassName: <storageClass>
    ## If set to "-", storageClassName: "", which disables dynamic provisioning
    ## If undefined (the default) or set to null, no storageClassName spec is
    ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
    ##   GKE, AWS & OpenStack)
    ##
    # storageClass: "-"
    accessMode: ReadWriteOnce
    size: 8Gi

## All of these values are only used when:
## a) mariadb.enabled is set to false and databaseType=mariadb
## b) postgresql.enabled is set to false and databaseType=postgresql
externalDatabase:
  ## Database host
  host: localhost

  ## Database name
  name: database

  ## Database User
  user: user

  ## Database Password
  password: ""

  ## Database port number (use 5432 when using PostgreSQL)
  port: 3306

## Kubernetes configuration
##   minikube: NodePort
##   ingress: ClusterIP
##   elsewhere: LoadBalancer
##
service:
  type: LoadBalancer
  # HTTP Port
  port: 80
  ## loadBalancerIP:
  ## Control hosts connecting to "LoadBalancer" only
  loadBalancerSourceRanges:
    - 0.0.0.0/0
  ##
  ## nodePorts:
  ##   http: <to set explicitly, choose port between 30000-32767>
  nodePorts:
    http: ""
  ## Enable client source IP preservation
  ## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
  ##
  externalTrafficPolicy: Cluster

## Configure the ingress resource that allows you to access the
## Redmine installation. Set up the URL
## ref: http://kubernetes.io/docs/user-guide/ingress/
##
ingress:
  ## Set to true to enable ingress record generation
  ##
  enabled: false

  ## Set this to true in order to add the corresponding annotations for cert-manager
  ##
  certManager: false

  ## When the ingress is enabled, a host pointing to this will be created
  ##
  hostname: redmine.local

  ## Enable TLS configuration for the hostname defined at ingress.hostname parameter
  ## TLS certificates will be retrieved from a TLS secret with name: {{- printf "%s-tls" .Values.ingress.hostname }}
  ## You can use the ingress.secrets parameter to create this TLS secret or relay on cert-manager to create it
  ##
  tls: false

  ## Ingress annotations done as key:value pairs
  ## For a full list of possible ingress annotations,
  ## please see https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
  ##
  ## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
  ##
  annotations:
    # kubernetes.io/ingress.class: nginx
    ## Keep the connection open with the API server even if idle (the default is 60 seconds)
    ## Setting it to 10 minutes which should be enough for our current use case of deploying/upgrading/deleting apps
    ##
    nginx.ingress.kubernetes.io/proxy-read-timeout: "600"

  ## The list of additional hostnames to be covered with this ingress record.
  ## Most likely the hostname above will be enough, but in the event more hosts are needed, this is an array
  ## extraHosts:
  ## - name: redmine.local
  ##   path: /

  ## The tls configuration for additional hostnames to be covered with this ingress record.
  ## see: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
  ## extraTls:
  ## - hosts:
  ##     - redmine.local
  ##   secretName: redmine.local-tls

  ## If you're providing your own certificates, please use this to add the certificates as secrets
  ## key and certificate should start with -----BEGIN CERTIFICATE----- or
  ## -----BEGIN RSA PRIVATE KEY-----
  ##
  ## name should line up with a tlsSecret set further up
  ## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set
  ##
  ## It is also possible to create and manage the certificates outside of this helm chart
  ## Please see README.md for more information
  ##
  secrets: []
  ## - name: redmine.local-tls
  ##   key:
  ##   certificate:

## Configure CronJob scheduler for receiveing emails and converting them to tasks
## ref: http://www.redmine.org/projects/redmine/wiki/RedmineReceivingEmails
##
mailReceiver:
  ## Whether to enable scheduled task
  enabled: false

  ## CronJob schedule
  schedule: "*/5 * * * *"

  ## CronJob suspend flag
  suspend: true

  image:
    registry: docker.io
    repository: bitnami/redmine
    tag: 4.1.1-debian-10-r132
    ## Specify a imagePullPolicy
    ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
    ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
    ##
    pullPolicy: IfNotPresent

  ## Protocol to use to get emails from configured server.
  ## Supported values are "IMAP" or "POP3"
  mailProtocol: IMAP

  ## Server hostname to connect to
  host: ""

  ## Server TCP port to connect to
  port: 993

  ## Username to authenticate on server
  username: ""

  ## Password to authenticate on server
  password: ""

  ## ssl flag for redmine mail client
  ## If true then client will use SSL/TLS
  ssl: true

  ## starttls flag for redmine mail client
  ## If true then client will use StartTLS
  startTLS: false

  ## IMAP only. Folder to read emails from
  imapFolder: "INBOX"

  ## Folder on mail server to move correctly parsed emails to
  ## If empty - just leave emails as read
  moveOnSuccess: ""

  ## Folder on mail server to move emails with parsing errors to
  ## If empty - just leave emails as read
  moveOnFailure: ""

  ## Action to perform for unknown email sender
  ## ref: http://www.redmine.org/projects/redmine/wiki/RedmineReceivingEmails
  unknownUserAction: ingore

  ## If set to 1 then redmine does not check task creator (source email) permissions for creating a new task
  ## If set to 0 then task creator must have permission to create a new task
  noPermissionCheck: 0

  ## Whether send a just created user (the creator of the task) email about his new account
  ## 0 - send, 1 - not send
  noAccountNotice: 1

  ## Defines a group list to add created user to
  ## Groups must be enumerated as names separated by comma without spaces
  defaultGroup: ""

  ## Defines a project to create a new task in
  project: ""

  ## Defines an email to use as a base for getting project name for a new task
  projectFromSubaddress: ""

  ## Defines a new task status
  status: ""

  ## Defines a new task tracker
  tracker: ""

  ## Defines a new task category
  category: ""

  ## Defines a new task priority
  priority: ""

  ## Defines a new task assignee
  assignedTo: ""

  ## Defines a list of attributes which can be overrided by received email body
  ## "all" means that all attributes can be overrided
  allowOverride: ""

# Add custom certificates and certificate authorities to redmine container
certificates:
  customCertificate:
    certificateSecret: ""
    chainSecret: {}
    # name: secret-name
    # key: secret-key
    certificateLocation: /etc/ssl/certs/ssl-cert-snakeoil.pem
    keyLocation: /etc/ssl/private/ssl-cert-snakeoil.key
    chainLocation: /etc/ssl/certs/mychain.pem
  customCA: []
  # - secret: custom-CA
  # - secret: more-custom-CAs
  image:
    registry: docker.io
    repository: bitnami/minideb
    tag: buster
    ## Specify a imagePullPolicy
    ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
    ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
    ##
    pullPolicy: IfNotPresent
    # pullPolicy:
    # pullSecrets
    #   - myRegistryKeySecretName
  extraEnvVars: []
  # - name: myvar
  #   value: myval
