diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2020-03-21 05:13:02 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2020-03-21 05:13:02 +0100 |
commit | 5de35a8ae4e76f283abf159f84bfa9c9b17efddb (patch) | |
tree | a0028adb00ef8ae86bd1adc8ff8089c3f905bfee /setup/projects/adei/vars/asec.yml | |
parent | ff3cbb6ee9aeac44a329c8eee505f60144d44b48 (diff) | |
download | ands-5de35a8ae4e76f283abf159f84bfa9c9b17efddb.tar.gz ands-5de35a8ae4e76f283abf159f84bfa9c9b17efddb.tar.bz2 ands-5de35a8ae4e76f283abf159f84bfa9c9b17efddb.tar.xz ands-5de35a8ae4e76f283abf159f84bfa9c9b17efddb.zip |
Add ASEC database to ADEI namespace
Diffstat (limited to 'setup/projects/adei/vars/asec.yml')
-rw-r--r-- | setup/projects/adei/vars/asec.yml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/setup/projects/adei/vars/asec.yml b/setup/projects/adei/vars/asec.yml new file mode 100644 index 0000000..b81e8e4 --- /dev/null +++ b/setup/projects/adei/vars/asec.yml @@ -0,0 +1,46 @@ +asec: + options: + delete: false + + pods: + asec_master: + kind: StatefulSet + sa: "adeidb" + service: { ports: [ 3306 ] } + network: { host: "{{ ands_hostnet_db | default(false) }}" } + sched: { replicas: 1, strategy: "Recreate", selector: { hostid: "3" } } + groups: [ "adei_asec" ] + labels: { 'service': 'asec-mysql' } + pvc: { 'asec_master': {} } + images: + - image: "chsa/mysql:5.7" + command: [ "run-mysqld-master" ] + env: + - { name: "MYSQL_ROOT_PASSWORD", value: "secret@asec/root-password" } + - { name: "MYSQL_USER", value: "asec" } + - { name: "MYSQL_USER_PRIV_SUPER", value: "1" } + - { name: "MYSQL_PASSWORD", value: "secret@asec/asec-password" } + - { name: "MYSQL_DATABASE", value: "asec" } + - { name: "MYSQL_EXTRADB", value: "%" } + - { name: "MYSQL_MASTER_USER", value: "replication" } + - { name: "MYSQL_MASTER_PASSWORD", value: "secret@asec/service-password" } + - { name: "MYSQL_PMA_PASSWORD", value: "secret@adei/pma-password" } + - { name: "MYSQL_MAX_CONNECTIONS", value: "500" } + - { name: "MYSQL_INNODB_BUFFER_POOL_SIZE", value: "4G" } + - { name: "MYSQL_INNODB_BUFFER_POOL_INSTANCES", value: "8" } + - { name: "MYSQL_INNODB_LOG_FILE_SIZE", value: "2G" } + - { name: "MYSQL_INNODB_LOG_BUFFER_SIZE", value: "16M" } + - { name: "MYSQL_SYNC_BINLOG", value: "0" } + - { name: "MYSQL_BINLOG_SYNC_DELAY", value: "25000" } + - { name: "MYSQL_BINLOG_NODELAY_COUNT", value: "32" } + - { name: "MYSQL_INNODB_FLUSH_LOG_TYPE", value: "2" } + - { name: "MYSQL_INNODB_FLUSH_METHOD", value: "O_DIRECT" } + - { name: "MYSQL_INNODB_FLUSH_LOG_TIMEOUT", value: "300" } + - { name: "MYSQL_BINLOG_FORMAT", value: "ROW" } +# - { name: "MYSQL_BINLOG_FORMAT", value: "MIXED" } + mappings: + - { name: "asec_master", mount: "/var/lib/mysql/data" } + resources: { request: { cpu: 1000m, mem: 4Gi }, limit: { cpu: 2000m, mem: 8Gi } } + probes: + - { type: "liveness", port: 3306 } + - { type: "readiness", command: [ /bin/sh, -i, -c, MYSQL_PWD="$MYSQL_PASSWORD" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1' ], delay: "15", timeout: "5" } |