Commit 403794a7 authored by Martin Õunap's avatar Martin Õunap

* Db Deploy

parents
Pipeline #160 failed with stages
apiVersion: kubedb.com/v1alpha1
kind: MySQL
metadata:
name: {{__Name__}
namespace: {{__nameSpace__}}
spec:
version: "8.0.14"
configSource:
configMap:
name: {{__configMapName__}}
replicas: 1
storageType: Durable
storage:
storageClassName: "nfs-client"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{__storageSize__}}Gi
monitor:
agent: prometheus.io/builtin
resources:
limits:
memory: "128Mi"
cpu: "100m"
podTemplate:
spec:
resources:
limits:
memory: "{{__memorySize__}}Mi"
cpu: "{{__CPU__|500|1000}}m"
terminationPolicy: WipeOut
updateStrategy:
type: RollingUpdate
apiVersion: v1
data:
db_conf.cnf: |-
[mysqld]
default_authentication_plugin = mysql_native_password
skip-name-resolve
max_connections = 300
max_user_connections = 300
myisam_sort_buffer_size = 64M
key_buffer_size = 256M
read_buffer_size = 1M
table_open_cache = 15000
thread_cache_size = 384
wait_timeout = 300
connect_timeout = 10
interactive_timeout = 7000
tmp_table_size = 256M
max_heap_table_size = 256M
innodb_buffer_pool_size = 1G
thread_cache_size = 100
join_buffer_size = 2M
read_buffer_size = 2M
sort_buffer_size = 3M
max_allowed_packet = 32M
max_connect_errors = 1000
innodb-flush-log-at-trx-commit = 2
### this configuration will purge flushed binary logs over 7 days old
binlog_expire_logs_seconds = 604800
kind: ConfigMap
metadata:
name: {{__dbConfName__}}
namespace: {{__nameSpace__}
apiVersion: kubedb.com/v1alpha1
kind: Postgres
metadata:
name: {{__DATABASE_NAME__}}
namespace: {{__nameSpace__}}
spec:
version: "11.2"
terminationPolicy: WipeOut
replicas: 2
standbyMode: Hot
storageType: Durable
storage:
storageClassName: "nfs-client"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{__Storage_Size__}}Gi
monitor:
agent: prometheus.io/builtin
podTemplate:
spec:
resources:
limits:
memory: "{{__Memory_Size__}}Mi"
cpu: "{{__cpu__|500|1000}}m"
env:
- name: POSTGRES_INITDB_ARGS
value: --encoding=UTF-8 --lc-collate=et_EE.utf8 --lc-ctype=et_EE.utf8
- name: POSTGRES_DB
value: {{__DATABASE_NAME_IN_DB__}}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment