# Default values for Percona XtraDB Cluster

## percona image and version
## ref: https://hub.docker.com/r/percona/percona-xtradb-cluster/tags/
image:
  repository: "percona/percona-xtradb-cluster"
  tag: "5.7.19"
  pullPolicy: IfNotPresent

# Desired number of members of xtradb cluster
replicas: 3

## Specify password for root user
##
# mysqlRootPassword: not-a-secure-password

## Specify password for xtradb backup user
##
# xtraBackupPassword: replicate-my-data

## Uncomment to create a database user
##
# mysqlUser: test
# mysqlPassword: test

## Allow unauthenticated access, uncomment to enable
##
# mysqlAllowEmptyPassword: true

## Uncomment to Create a database
##
# mysqlDatabase: test

## hosts to allow root user access from
# set to "127.0.0.1" to deny remote root.
allowRootFrom: "%"

## Persist data to a persistent volume
persistence:
  enabled: false
  ## percona 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

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

## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
# resources:
#  requests:
#    memory: 256Mi
#    cpu: 100m

configFiles:
  node.cnf: |+
    [mysqld]
    datadir=/var/lib/mysql
    default_storage_engine=InnoDB
    binlog_format=ROW
    innodb_flush_log_at_trx_commit  = 0
    innodb_flush_method             = O_DIRECT
    innodb_file_per_table           = 1
    innodb_autoinc_lock_mode=2
    bind_address = 0.0.0.0
    wsrep_slave_threads=2
    wsrep_cluster_address=gcomm://
    wsrep_provider=/usr/lib/galera3/libgalera_smm.so
    wsrep_cluster_name=galera
    wsrep_sst_method=xtrabackup-v2

## When set to true will create sidecar for `prom/mysqld-exporter`
## metrics exporting
metricsExporter: false

## When set to true will create sidecar to tail mysql log
logTail: true
