k8s-manifests/proxysql/base/proxysql-configmap.yml
Micke 5763665c72
author Micke <kano@sunet.se> 1679915017 +0000
committer Micke Nordin <kano@sunet.se> 1680110378 +0200
gpgsig -----BEGIN PGP SIGNATURE-----

 iQIzBAABCgAdFiEEIpL7dwHsMfazpY3ODaCnpXCP4lcFAmQkcyoACgkQDaCnpXCP
 4ld8Rg/7BSPA3rrDV9JbfQYtuE1/wpMy+hfYC/jIiD3VpwPKZ27r8/LzIsrquL6o
 nOfQT5cj/Jm2WrZoS+6pRlmWxzbBN6Oc6XJMxrUu+JVHSyCYNSFU+j074/4B3mNW
 +YDw2415/sEBJbhBcCmNOfWVZuOq1+AsfBkZ1vhUT0GzKahGIBMzgK8P+5IBsXCp
 7t/N5EmvFy6mzubkT8LN9ZQ0WMd2OxBeBDPUcrwlrT6kxA/1JQfaZ4PWtSb7QD0G
 IQAeUAy3p9JxXRQyWmunEYrxp0maO6EPyp6O656C75JKn7lOhMGMR2S5FT3jPK5d
 KrbewbCsRiq3O94STxytBdDjT/Ez2vk0/tj7cW5r0hb2Pd1cVgHlcRP53r8dzSn9
 RIRycGKB49k2MYByNGJN3oM9KYB2vpIhqmy9vyFn3HinhD8nyj0VDAo0LWDCKnbh
 dt7jTKAsr1y9bXPK+3YM/2QiCdPMDz1xYd1BhbFgQ5B5Eb8iB0iQn9UHPe884wNN
 Zs+yPAGRyPrAVvCnopV2IZJpGI7oKjnmcgBanbTJK+UKkfmb0a4S/fbCezjhT6Qc
 105jvtmZgj44aSqtBSkXvV9UoCtjePEBifhcQznzpi8eudbo1Hhg5UjO5rwwhl2P
 lUQgs75Rsfd549YBV/Rq1szlVODTsMhU2oDr83t8Vf/TF9GdhEg=
 =Hnvm
 -----END PGP SIGNATURE-----

Nextcloud in K8s: MVP

This is the minumum needed to run a multinode customer in kubernetes.
Each customer will run in their own namespace with a nextcloud
container and a redis container. There is a proxysql cluster running in
its own namespace, used by all customer.

This is a monorepo that uses kustomize to allow using this repo for both
prod and test (and other things we can think of in the future).
2023-03-29 19:21:13 +02:00

409 lines
10 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: proxysql-configmap
namespace: proxysql
data:
proxysql.cnf: |
datadir="/var/lib/proxysql"
admin_variables=
{
admin_credentials="admin:{{ADMIN_PASSWORD}};cluster:{{CLUSTER_PASSWORD}}"
mysql_ifaces="0.0.0.0:6032"
refresh_interval=2000
cluster_username="cluster"
cluster_password="{{CLUSTER_PASSWORD}}"
}
mysql_variables=
{
threads=4
max_connections=2048
default_query_delay=0
default_query_timeout=36000000
have_compress=true
poll_timeout=2000
interfaces="0.0.0.0:6033;/tmp/proxysql.sock"
default_schema="information_schema"
stacksize=1048576
server_version="8.0.23"
connect_timeout_server=3000
monitor_username="proxysql"
monitor_password="{{MONITOR_PASSWORD}}"
monitor_history=600000
monitor_connect_interval=60000
monitor_ping_interval=10000
monitor_read_only_interval=1500
monitor_read_only_timeout=500
ping_interval_server_msec=120000
ping_timeout_server=500
commands_stats=true
sessions_sort=true
connect_retries_on_failure=10
}
mysql_galera_hostgroups =
(
{
writer_hostgroup=10
backup_writer_hostgroup=20
reader_hostgroup=30
offline_hostgroup=9999
max_writers=1
writer_is_also_reader=2
max_transactions_behind=30
active=1
}
)
mysql_query_rules =
(
{
rule_id=100
active=1
match_pattern="^SELECT .* FOR UPDATE"
destination_hostgroup=10
apply=1
},
{
rule_id=200
active=1
match_pattern="^SELECT .*"
destination_hostgroup=30
apply=1
},
{
rule_id=300
active=1
match_pattern=".*"
destination_hostgroup=10
apply=1
}
)
mysql_servers =
(
{ address="multinode-db1" , port=3306 , hostgroup=10, max_connections=100 },
{ address="multinode-db2" , port=3306 , hostgroup=20, max_connections=100 },
{ address="multinode-db3" , port=3306 , hostgroup=30, max_connections=100 }
)
mysql_users =
(
{
username="nextcloud_antagning"
password="{{ANTAGNING_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_bth"
password="{{BTH_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_chalmers"
password="{{CHALMERS_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_du"
password="{{DU_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_esh"
password="{{ESH_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_fhs"
password="{{FHS_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_gu"
password="{{GU_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_hb"
password="{{HB_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_hhs"
password="{{HHS_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_hig"
password="{{HIG_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_his"
password="{{HIS_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_hj"
password="{{HJ_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_hv"
password="{{HV_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_irf"
password="{{IRF_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_kb"
password="{{KB_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_ki"
password="{{KI_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_kkh"
password="{{KKH_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_kmh"
password="{{KMH_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_konstfack"
password="{{KONSTFACK_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_kth"
password="{{KTH_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_kva"
password="{{KVA_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_liu"
password="{{LIU_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_lnu"
password="{{LNU_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_ltu"
password="{{LTU_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_lu"
password="{{LU_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_mau"
password="{{MAU_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_miun"
password="{{MIUN_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_nordunet"
password="{{NORDUNET_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_nrm"
password="{{NRM_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_oru"
password="{{ORU_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_rkh"
password="{{RKH_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_shh"
password="{{SHH_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_sics"
password="{{SICS_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_slu"
password="{{SLU_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_smhi"
password="{{SMHI_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_sp"
password="{{SP_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_swamid"
password="{{SWAMID_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_ths"
password="{{THS_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_uhr"
password="{{UHR_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_umu"
password="{{UMU_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_uniarts"
password="{{UNIARTS_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_uu"
password="{{UU_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_vinnova"
password="{{VINNOVA_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
{
username="nextcloud_vr"
password="{{VR_PASSWORD}}"
default_hostgroup=10
transaction_persistent=1
active=1
},
)
proxysql_servers =
(
{ hostname = "proxysql-0.proxysqlcluster", port = 6032, weight = 1 },
{ hostname = "proxysql-1.proxysqlcluster", port = 6032, weight = 1 },
{ hostname = "proxysql-2.proxysqlcluster", port = 6032, weight = 1 }
)