cluster

Infrastructure files for Nordgedanken and Midnightthoughts.
git clone git://archive.git.mtrnord.blog/MTRNord/cluster.git
Log | Files | Refs | README

mysql-cm.yaml (1133B)


      1 apiVersion: v1
      2 kind: ConfigMap
      3 metadata:
      4   name: mysql-configmap
      5   namespace: blog
      6 data:
      7   init.sql: |
      8     CREATE USER '$MYSQL_USER'@'%' IDENTIFIED BY '$MYSQL_PASSWORD';
      9     GRANT ALL PRIVILEGES ON '$MYSQL_DATABASE'.* TO '$MYSQL_USER'@'%';
     10     FLUSH PRIVILEGES;
     11 ---
     12 apiVersion: v1
     13 kind: ConfigMap
     14 metadata:
     15   name: mysql-config
     16   namespace: blog
     17 data:
     18   performance.cnf: |
     19     [mysqld]
     20     innodb_buffer_pool_size = 3G
     21     innodb_buffer_pool_instances = 4
     22     innodb_io_capacity = 2000
     23     innodb_io_capacity_max = 4000
     24     innodb_read_io_threads = 4
     25     innodb_write_io_threads = 4
     26     innodb_file_per_table = 1
     27     innodb_log_file_size = 512M
     28     thread_cache_size = 16
     29     thread_handling = pool-of-threads
     30     thread_pool_size = 4
     31     thread_cache_size = 48
     32     query_cache_size = 128M
     33     query_cache_type = 1
     34     table_open_cache = 4096
     35     table_definition_cache = 1024
     36     table_open_cache_instances = 4
     37     join_buffer_size = 4M
     38     sort_buffer_size = 6M
     39     read_rnd_buffer_size = 2M
     40     tmp_table_size = 64M
     41     max_heap_table_size = 64M
     42     max_allowed_packet = 64M
     43     performance_schema = ON
     44 
     45     max_connections = 150