apiVersion: v1
kind: ConfigMap
metadata:
  name: mysql-etc-configmap
  namespace: kong
data:
  my.cnf: |-
    [client]
    port        = 3306
    [mysqld_safe]
    open-files-limit = 65535
    nice	= 0
    [mysqld]
    user	= mysql
    port        = 3306
    default-storage-engine=InnoDB
    character_set_server    = utf8
    collation_server        = utf8_general_ci
    #explicit_defaults_for_timestamp = true
    skip-external-locking
    #key_buffer_size = 64M
    bulk_insert_buffer_size = 64M
    max_allowed_packet = 32M
    table_open_cache = 3600
    open_files_limit=65535
    tmp_table_size=256M
    sort_buffer_size = 4M
    read_buffer_size = 16M
    query_cache_min_res_unit = 2k
    read_rnd_buffer_size = 16M
    myisam_sort_buffer_size = 128M
    #thread_handling		= pool-of-threads
    #thread_pool_oversubscribe = 10
    interactive_timeout = 600
    wait_timeout        = 300
    back_log            = 1000
    max_connections     = 1000
    max_connect_errors  = 2000
    thread_cache_size = 256
    query_cache_type=1
    query_cache_size= 128M
    transaction_isolation =  READ-COMMITTED
    innodb_buffer_pool_size = 1024M
    skip-name-resolve
    #innodb_buffer_pool_instances = 8
    #innodb_file_per_table = 1
    datadir = /var/lib/mysql/mydata
    #log-bin=/data/binlogs/mysql-bin
    #expire_logs_day=30
    max_binlog_size = 256M
    slow_query_log=ON
    #slow-query-log-file=/data/binlogs/slow_query.log
    long_query_time=2
    log-slow-admin-statements = 0
    log_bin_trust_function_creators=1
    binlog_format=mixed
    sync_binlog     = 0
    server-id   = 1
    innodb_write_io_threads = 8
    innodb_read_io_threads = 16
    innodb_flush_log_at_trx_commit = 2
    innodb_large_prefix = 1
    innodb_log_files_in_group = 2
    innodb_max_dirty_pages_pct = 60
    innodb_flush_method     = O_DIRECT_NO_FSYNC
    innodb_flush_neighbors  = 0
    innodb_adaptive_flushing = 1
    #innodb_adaptive_flushing_method = "estimate"
    innodb_adaptive_hash_index = 1
    innodb_lock_wait_timeout = 60
    innodb_io_capacity      = 8000
    #innodb_file_format     = barracuda
    #innodb_file_format_max = barracuda
    #innodb_commit_concurrency = 1
    #innodb_page_size       = 8k
    #innodb_checksums       = 0
    innodb_doublewrite      = 0
    innodb_support_xa       = 1
    #innodb_use_native_aio   = 1
    innodb_stats_persistent = 1
    innodb_purge_threads    = 4
    innodb_sync_spin_loops  = 100
    innodb_spin_wait_delay  = 30
    innodb_old_blocks_time  = 1000
    #innodb_log_block_size   = 4096
    innodb_old_blocks_pct   = 60
    innodb_open_files       = 4096
    [mysqldump]
    quick
    max_allowed_packet = 64M
    [mysql]
    no-auto-rehash
    [myisamchk]
    key_buffer_size = 64M
    sort_buffer_size = 512M
    read_buffer = 256M
    write_buffer = 256M
    [mysqlhotcopy]
    interactive-timeout
