vaibhavjayas | ea9aee0 | 2018-08-31 06:22:26 +0000 | [diff] [blame] | 1 | # Copyright © 2018 Amdocs, Bell Canada |
Krzysztof Opasiak | 01c975b | 2019-12-16 17:42:38 +0100 | [diff] [blame] | 2 | # Copyright © 2019 Samsung Electronics |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 3 | # Copyright © 2020 Bitnami, Orange |
vaibhavjayas | ea9aee0 | 2018-08-31 06:22:26 +0000 | [diff] [blame] | 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 17 | |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 18 | ################################################################# |
Krzysztof Opasiak | 01c975b | 2019-12-16 17:42:38 +0100 | [diff] [blame] | 19 | # Secrets metaconfig |
| 20 | ################################################################# |
| 21 | secrets: |
Krzysztof Opasiak | a789c1a | 2020-01-22 00:06:32 +0100 | [diff] [blame] | 22 | - uid: '{{ include "common.mariadb.secret.rootPassUID" . }}' |
Krzysztof Opasiak | 01c975b | 2019-12-16 17:42:38 +0100 | [diff] [blame] | 23 | type: password |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 24 | externalSecret: '{{ tpl (default "" .Values.rootUser.externalSecret) . }}' |
| 25 | password: '{{ .Values.rootUser.password }}' |
Krzysztof Opasiak | a789c1a | 2020-01-22 00:06:32 +0100 | [diff] [blame] | 26 | - uid: '{{ include "common.mariadb.secret.userCredentialsUID" . }}' |
Krzysztof Opasiak | 01c975b | 2019-12-16 17:42:38 +0100 | [diff] [blame] | 27 | type: basicAuth |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 28 | externalSecret: '{{ tpl (default "" .Values.db.externalSecret) . }}' |
| 29 | login: '{{ .Values.db.user }}' |
| 30 | password: '{{ .Values.db.password }}' |
| 31 | - uid: '{{ include "common.mariadb.secret.backupCredentialsUID" . }}' |
| 32 | type: basicAuth |
| 33 | externalSecret: '{{ tpl (default "" .Values.galera.mariabackup.externalSecret) . }}' |
| 34 | login: '{{ .Values.galera.mariabackup.user }}' |
| 35 | password: '{{ .Values.galera.mariabackup.password }}' |
Krzysztof Opasiak | 01c975b | 2019-12-16 17:42:38 +0100 | [diff] [blame] | 36 | |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 37 | # bitnami image doesn't support well single quote in password |
| 38 | passwordStrengthOverride: basic |
Krzysztof Opasiak | 01c975b | 2019-12-16 17:42:38 +0100 | [diff] [blame] | 39 | |
| 40 | ################################################################# |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 41 | # Global configuration defaults. |
| 42 | ################################################################# |
| 43 | global: |
| 44 | nodePortPrefix: 302 |
Akansha Dua | 3fb95ef | 2019-09-04 11:47:43 +0000 | [diff] [blame] | 45 | persistence: |
| 46 | mountPath: /dockerdata-nfs |
| 47 | backup: |
| 48 | mountPath: /dockerdata-nfs/backup |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 49 | clusterDomain: cluster.local |
| 50 | metrics: {} |
Akansha Dua | 3fb95ef | 2019-09-04 11:47:43 +0000 | [diff] [blame] | 51 | |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 52 | image: bitnami/mariadb-galera:10.5.8 |
| 53 | ## Specify a imagePullPolicy |
| 54 | ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' |
| 55 | ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images |
| 56 | ## |
| 57 | pullPolicy: Always |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 58 | |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 59 | ## Set to true if you would like to see extra information on logs |
| 60 | ## It turns BASH debugging in minideb-extras-base |
| 61 | ## |
| 62 | debug: true |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 63 | |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 64 | ## Sometimes, especially when a lot of pods are created at the same time, |
| 65 | ## actions performed on the databases are tried to be done before actual start. |
| 66 | init_sleep_time: 5 |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 67 | |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 68 | ## String to partially override common.names.fullname template (will maintain the release name) |
| 69 | ## |
| 70 | nameOverride: mariadb-galera |
| 71 | |
| 72 | ## Use an alternate scheduler, e.g. "stork". |
| 73 | ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ |
| 74 | ## |
| 75 | # schedulerName: |
| 76 | |
| 77 | ## StatefulSet controller supports relax its ordering guarantees while preserving its uniqueness and identity guarantees. There are two valid pod management policies: OrderedReady and Parallel |
| 78 | ## ref: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#pod-management-policy |
| 79 | ## |
| 80 | podManagementPolicy: OrderedReady |
| 81 | |
| 82 | ## MariaDB Gallera K8s svc properties |
| 83 | ## |
| 84 | service: |
| 85 | ## Kubernetes service type and port number |
| 86 | ## |
| 87 | type: ClusterIP |
| 88 | headless: {} |
Mahmoud Abdelhamid | dfa07dd | 2021-06-15 16:43:02 +0200 | [diff] [blame] | 89 | internalPort: &dbPort 3306 |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 90 | ports: |
| 91 | - name: mysql |
Mahmoud Abdelhamid | dfa07dd | 2021-06-15 16:43:02 +0200 | [diff] [blame] | 92 | port: *dbPort |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 93 | headlessPorts: |
| 94 | - name: galera |
| 95 | port: 4567 |
| 96 | - name: ist |
| 97 | port: 4568 |
| 98 | - name: sst |
| 99 | port: 4444 |
| 100 | |
| 101 | |
| 102 | ## Pods Service Account |
| 103 | ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ |
| 104 | ## |
| 105 | serviceAccount: |
| 106 | nameOverride: mariadb-galera |
| 107 | roles: |
| 108 | - read |
| 109 | |
| 110 | ## Pod Security Context |
| 111 | ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ |
| 112 | ## |
| 113 | securityContext: |
| 114 | enabled: true |
| 115 | user_id: 10001 |
| 116 | group_id: 10001 |
| 117 | |
| 118 | ## Database credentials for root (admin) user |
| 119 | ## |
| 120 | rootUser: |
| 121 | ## MariaDB admin user |
| 122 | user: root |
| 123 | ## MariaDB admin password |
| 124 | ## Password is ignored if externalSecret is specified. |
| 125 | ## If not set, password will be "randomly" generated |
| 126 | ## ref: https://github.com/bitnami/bitnami-docker-mariadb-galera#setting-the-root-password-on-first-run |
| 127 | ## |
| 128 | # password: |
| 129 | # externalSecret: |
| 130 | |
| 131 | ## Custom db configuration |
| 132 | ## |
| 133 | db: |
| 134 | ## MariaDB username and password |
| 135 | ## Password is ignored if externalSecret is specified. |
| 136 | ## If not set, password will be "randomly" generated |
| 137 | ## ref: https://github.com/bitnami/bitnami-docker-mariadb-galera#creating-a-database-user-on-first-run |
| 138 | ## |
| 139 | user: my-user |
| 140 | # password: |
| 141 | # externalSecret: |
| 142 | ## Database to create |
| 143 | ## ref: https://github.com/bitnami/bitnami-docker-mariadb-galera#creating-a-database-on-first-run |
| 144 | ## |
| 145 | # name: my_database |
| 146 | |
| 147 | ## Galera configuration |
| 148 | ## |
| 149 | galera: |
| 150 | ## Galera cluster name |
| 151 | ## |
| 152 | name: galera |
| 153 | |
| 154 | ## Bootstraping options |
| 155 | ## ref: https://github.com/bitnami/bitnami-docker-mariadb-galera#bootstraping |
| 156 | bootstrap: |
| 157 | ## Node to bootstrap from, you will need to change this parameter incase you want to bootstrap from other node |
| 158 | ## |
| 159 | bootstrapFromNode: |
| 160 | ## Force safe_to_bootstrap in grastate.date file. |
| 161 | ## This will set safe_to_bootstrap=1 in the node indicated by bootstrapFromNode. |
| 162 | forceSafeToBootstrap: false |
| 163 | |
| 164 | ## Credentials to perform backups |
| 165 | ## |
| 166 | mariabackup: |
| 167 | ## MariaBackup username and password |
| 168 | ## Password is ignored if externalSecret is specified. |
| 169 | ## If not set, password will be "randomly" generated |
| 170 | ## ref: https://github.com/bitnami/bitnami-docker-mariadb-galera#setting-up-a-multi-master-cluster |
| 171 | ## |
| 172 | user: mariabackup |
| 173 | # password: |
| 174 | # externalSecret: |
| 175 | |
| 176 | backup: |
| 177 | enabled: false |
| 178 | cron: "00 00 * * *" |
| 179 | retentionPeriod: 3 |
| 180 | persistence: |
| 181 | ## If true, use a Persistent Volume Claim, If false, use emptyDir |
| 182 | ## |
| 183 | enabled: true |
| 184 | # Enable persistence using an existing PVC |
| 185 | # existingClaim: |
| 186 | ## selector can be used to match an existing PersistentVolume |
| 187 | ## selector: |
| 188 | ## matchLabels: |
| 189 | ## app: my-app |
| 190 | selector: {} |
| 191 | ## Persistent Volume Storage Class |
| 192 | ## If defined, storageClassName: <storageClass> |
| 193 | ## If set to "-", storageClassName: "", which disables dynamic provisioning |
| 194 | ## If undefined (the default) or set to null, no storageClassName spec is |
| 195 | ## set, choosing the default provisioner. (gp2 on AWS, standard on |
| 196 | ## GKE, AWS & OpenStack) |
| 197 | ## |
| 198 | # storageClass: "-" |
| 199 | ## Persistent Volume Claim annotations |
| 200 | ## |
| 201 | annotations: |
| 202 | ## Persistent Volume Access Mode |
| 203 | ## |
| 204 | accessMode: ReadWriteOnce |
| 205 | ## Persistent Volume size |
| 206 | ## |
| 207 | size: 2Gi |
| 208 | |
| 209 | |
| 210 | readinessCheck: |
| 211 | wait_for: |
| 212 | - '{{ include "common.name" . }}' |
| 213 | |
| 214 | ## TLS configuration |
| 215 | ## |
| 216 | tls: |
| 217 | ## Enable TLS |
| 218 | ## |
| 219 | enabled: false |
| 220 | ## Name of the secret that contains the certificates |
| 221 | ## |
| 222 | # certificatesSecret: |
| 223 | ## Certificate filename |
| 224 | ## |
| 225 | # certFilename: |
| 226 | ## Certificate Key filename |
| 227 | ## |
| 228 | # certKeyFilename: |
| 229 | ## CA Certificate filename |
| 230 | ## |
| 231 | # certCAFilename: |
| 232 | |
| 233 | ## Configure MariaDB with a custom my.cnf file |
| 234 | ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file |
| 235 | ## Alternatively, you can put your my.cnf under the files/ directory |
| 236 | ## |
| 237 | mariadbConfiguration: |- |
| 238 | [client] |
| 239 | port=3306 |
| 240 | socket=/opt/bitnami/mariadb/tmp/mysql.sock |
| 241 | plugin_dir=/opt/bitnami/mariadb/plugin |
| 242 | |
| 243 | [mysqld] |
| 244 | lower_case_table_names = 1 |
| 245 | default_storage_engine=InnoDB |
| 246 | basedir=/opt/bitnami/mariadb |
| 247 | datadir=/bitnami/mariadb/data |
| 248 | plugin_dir=/opt/bitnami/mariadb/plugin |
| 249 | tmpdir=/opt/bitnami/mariadb/tmp |
| 250 | socket=/opt/bitnami/mariadb/tmp/mysql.sock |
| 251 | pid_file=/opt/bitnami/mariadb/tmp/mysqld.pid |
| 252 | bind_address=0.0.0.0 |
| 253 | |
| 254 | ## Character set |
| 255 | collation_server=utf8_unicode_ci |
| 256 | init_connect='SET NAMES utf8' |
| 257 | character_set_server=utf8 |
| 258 | |
| 259 | ## MyISAM |
| 260 | key_buffer_size=32M |
| 261 | myisam_recover_options=FORCE,BACKUP |
| 262 | |
| 263 | ## Safety |
| 264 | skip_host_cache |
| 265 | skip_name_resolve |
| 266 | max_allowed_packet=16M |
| 267 | max_connect_errors=1000000 |
| 268 | sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY |
| 269 | sysdate_is_now=1 |
| 270 | |
| 271 | ## Binary Logging |
| 272 | log_bin=mysql-bin |
| 273 | expire_logs_days=14 |
| 274 | # Disabling for performance per http://severalnines.com/blog/9-tips-going-production-galera-cluster-mysql |
| 275 | sync_binlog=0 |
| 276 | # Required for Galera |
| 277 | binlog_format=row |
| 278 | |
| 279 | ## Caches and Limits |
| 280 | tmp_table_size=32M |
| 281 | max_heap_table_size=32M |
| 282 | # Re-enabling as now works with Maria 10.1.2 |
| 283 | query_cache_type=1 |
| 284 | query_cache_limit=4M |
| 285 | query_cache_size=256M |
| 286 | max_connections=500 |
| 287 | thread_cache_size=50 |
| 288 | open_files_limit=65535 |
| 289 | table_definition_cache=4096 |
| 290 | table_open_cache=4096 |
| 291 | |
| 292 | ## InnoDB |
| 293 | innodb=FORCE |
| 294 | innodb_strict_mode=1 |
| 295 | # Mandatory per https://github.com/codership/documentation/issues/25 |
| 296 | innodb_autoinc_lock_mode=2 |
| 297 | # Per https://www.percona.com/blog/2006/08/04/innodb-double-write/ |
| 298 | innodb_doublewrite=1 |
| 299 | innodb_flush_method=O_DIRECT |
| 300 | innodb_log_files_in_group=2 |
| 301 | innodb_log_file_size=128M |
| 302 | innodb_flush_log_at_trx_commit=1 |
| 303 | innodb_file_per_table=1 |
| 304 | # 80% Memory is default reco. |
| 305 | # Need to re-evaluate when DB size grows |
| 306 | innodb_buffer_pool_size=2G |
| 307 | innodb_file_format=Barracuda |
| 308 | |
| 309 | ## Logging |
| 310 | log_error=/opt/bitnami/mariadb/logs/mysqld.log |
| 311 | slow_query_log_file=/opt/bitnami/mariadb/logs/mysqld.log |
| 312 | log_queries_not_using_indexes=1 |
| 313 | slow_query_log=1 |
| 314 | |
| 315 | ## SSL |
| 316 | ## Use extraVolumes and extraVolumeMounts to mount /certs filesystem |
| 317 | # ssl_ca=/certs/ca.pem |
| 318 | # ssl_cert=/certs/server-cert.pem |
| 319 | # ssl_key=/certs/server-key.pem |
| 320 | |
| 321 | [galera] |
| 322 | wsrep_on=ON |
| 323 | wsrep_provider=/opt/bitnami/mariadb/lib/libgalera_smm.so |
| 324 | wsrep_sst_method=mariabackup |
| 325 | wsrep_slave_threads=4 |
| 326 | wsrep_cluster_address=gcomm:// |
| 327 | wsrep_cluster_name=galera |
| 328 | wsrep_sst_auth="root:" |
| 329 | # Enabled for performance per https://mariadb.com/kb/en/innodb-system-variables/#innodb_flush_log_at_trx_commit |
| 330 | innodb_flush_log_at_trx_commit=2 |
| 331 | # MYISAM REPLICATION SUPPORT # |
| 332 | wsrep_replicate_myisam=ON |
Sylvain Desbureaux | 7d3ddcd | 2021-04-22 17:18:11 +0200 | [diff] [blame] | 333 | binlog_format=row |
| 334 | default_storage_engine=InnoDB |
| 335 | innodb_autoinc_lock_mode=2 |
| 336 | transaction-isolation=READ-COMMITTED |
| 337 | wsrep_causal_reads=1 |
| 338 | wsrep_sync_wait=7 |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 339 | |
| 340 | [mariadb] |
| 341 | plugin_load_add=auth_pam |
| 342 | |
| 343 | ## Data-at-Rest Encryption |
| 344 | ## Use extraVolumes and extraVolumeMounts to mount /encryption filesystem |
| 345 | # plugin_load_add=file_key_management |
| 346 | # file_key_management_filename=/encryption/keyfile.enc |
| 347 | # file_key_management_filekey=FILE:/encryption/keyfile.key |
| 348 | # file_key_management_encryption_algorithm=AES_CTR |
| 349 | # encrypt_binlog=ON |
| 350 | # encrypt_tmp_files=ON |
| 351 | |
| 352 | ## InnoDB/XtraDB Encryption |
| 353 | # innodb_encrypt_tables=ON |
| 354 | # innodb_encrypt_temporary_tables=ON |
| 355 | # innodb_encrypt_log=ON |
| 356 | # innodb_encryption_threads=4 |
| 357 | # innodb_encryption_rotate_key_age=1 |
| 358 | |
| 359 | ## Aria Encryption |
| 360 | # aria_encrypt_tables=ON |
| 361 | # encrypt_tmp_disk_tables=ON |
| 362 | |
| 363 | ## MariaDB additional command line flags |
| 364 | ## Can be used to specify command line flags, for example: |
| 365 | ## |
| 366 | ## extraFlags: "--max-connect-errors=1000 --max_connections=155" |
| 367 | |
| 368 | ## Desired number of cluster nodes |
| 369 | ## |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 370 | replicaCount: 3 |
| 371 | |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 372 | ## updateStrategy for MariaDB Master StatefulSet |
| 373 | ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies |
| 374 | ## |
| 375 | updateStrategy: |
| 376 | type: RollingUpdate |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 377 | |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 378 | ## Additional pod annotations for MariaDB Galera pods |
| 379 | ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ |
| 380 | ## |
| 381 | podAnnotations: {} |
| 382 | |
| 383 | ## Pod affinity preset |
| 384 | ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity |
| 385 | ## Allowed values: soft, hard |
| 386 | ## |
| 387 | podAffinityPreset: "" |
| 388 | |
| 389 | ## Pod anti-affinity preset |
| 390 | ## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity |
| 391 | ## Allowed values: soft, hard |
| 392 | ## |
| 393 | podAntiAffinityPreset: soft |
| 394 | |
| 395 | ## Node affinity preset |
| 396 | ## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity |
| 397 | ## Allowed values: soft, hard |
| 398 | ## |
| 399 | nodeAffinityPreset: |
| 400 | ## Node affinity type |
| 401 | ## Allowed values: soft, hard |
| 402 | type: "" |
| 403 | ## Node label key to match |
| 404 | ## E.g. |
| 405 | ## key: "kubernetes.io/e2e-az-name" |
| 406 | ## |
| 407 | key: "" |
| 408 | ## Node label values to match |
| 409 | ## E.g. |
| 410 | ## values: |
| 411 | ## - e2e-az1 |
| 412 | ## - e2e-az2 |
| 413 | ## |
| 414 | values: [] |
| 415 | |
| 416 | ## Affinity for pod assignment. Evaluated as a template. |
| 417 | ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity |
| 418 | ## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set |
| 419 | ## |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 420 | affinity: {} |
| 421 | |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 422 | ## Node labels for pod assignment. Evaluated as a template. |
| 423 | ## ref: https://kubernetes.io/docs/user-guide/node-selection/ |
| 424 | ## |
| 425 | nodeSelector: {} |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 426 | |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 427 | ## Tolerations for pod assignment. Evaluated as a template. |
| 428 | ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ |
| 429 | ## |
| 430 | tolerations: [] |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 431 | |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 432 | ## Enable persistence using Persistent Volume Claims |
| 433 | ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ |
| 434 | ## |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 435 | persistence: |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 436 | ## If true, use a Persistent Volume Claim, If false, use emptyDir |
| 437 | ## |
| 438 | enabled: true |
| 439 | # Enable persistence using an existing PVC |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 440 | # existingClaim: |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 441 | mountPath: /dockerdata-nfs |
| 442 | mountSubPath: "mariadb-galera/data" |
| 443 | ## selector can be used to match an existing PersistentVolume |
| 444 | ## selector: |
| 445 | ## matchLabels: |
| 446 | ## app: my-app |
| 447 | selector: {} |
| 448 | ## Persistent Volume Storage Class |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 449 | ## If defined, storageClassName: <storageClass> |
| 450 | ## If set to "-", storageClassName: "", which disables dynamic provisioning |
| 451 | ## If undefined (the default) or set to null, no storageClassName spec is |
| 452 | ## set, choosing the default provisioner. (gp2 on AWS, standard on |
| 453 | ## GKE, AWS & OpenStack) |
| 454 | ## |
| 455 | # storageClass: "-" |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 456 | ## Persistent Volume Claim annotations |
| 457 | ## |
| 458 | annotations: |
| 459 | ## Persistent Volume Access Mode |
| 460 | ## |
Sylvain Desbureaux | 2285a28 | 2019-08-29 16:17:16 +0200 | [diff] [blame] | 461 | accessMode: ReadWriteOnce |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 462 | ## Persistent Volume size |
| 463 | ## |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 464 | size: 2Gi |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 465 | |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 466 | ## Additional pod labels |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 467 | ## |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 468 | # podLabels: |
| 469 | # extraLabel: extraValue |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 470 | |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 471 | ## Priority Class Name |
| 472 | # |
| 473 | # priorityClassName: 'priorityClass' |
| 474 | |
| 475 | ## MariaDB Galera containers' resource requests and limits |
| 476 | ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ |
| 477 | ## |
| 478 | flavor: small |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 479 | resources: |
Sylvain Desbureaux | ff702c7 | 2018-11-23 14:25:57 +0100 | [diff] [blame] | 480 | small: |
| 481 | limits: |
Sylvain Desbureaux | 4d04706 | 2021-05-05 17:16:57 +0200 | [diff] [blame] | 482 | cpu: 1 |
| 483 | memory: 4Gi |
Sylvain Desbureaux | ff702c7 | 2018-11-23 14:25:57 +0100 | [diff] [blame] | 484 | requests: |
Sylvain Desbureaux | 4d04706 | 2021-05-05 17:16:57 +0200 | [diff] [blame] | 485 | cpu: 500m |
| 486 | memory: 2Gi |
Sylvain Desbureaux | ff702c7 | 2018-11-23 14:25:57 +0100 | [diff] [blame] | 487 | large: |
| 488 | limits: |
| 489 | cpu: 2 |
Sylvain Desbureaux | 4d04706 | 2021-05-05 17:16:57 +0200 | [diff] [blame] | 490 | memory: 6Gi |
Sylvain Desbureaux | ff702c7 | 2018-11-23 14:25:57 +0100 | [diff] [blame] | 491 | requests: |
| 492 | cpu: 1 |
Sylvain Desbureaux | 4d04706 | 2021-05-05 17:16:57 +0200 | [diff] [blame] | 493 | memory: 3Gi |
Sylvain Desbureaux | ff702c7 | 2018-11-23 14:25:57 +0100 | [diff] [blame] | 494 | unlimited: {} |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 495 | |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 496 | ## MariaDB Galera containers' liveness and readiness probes |
| 497 | ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes |
| 498 | ## |
| 499 | livenessProbe: |
| 500 | enabled: true |
Sylvain Desbureaux | 7f09e76 | 2021-05-05 09:20:18 +0200 | [diff] [blame] | 501 | initialDelaySeconds: 1 |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 502 | periodSeconds: 10 |
| 503 | timeoutSeconds: 1 |
| 504 | successThreshold: 1 |
| 505 | failureThreshold: 3 |
| 506 | readinessProbe: |
| 507 | enabled: true |
Sylvain Desbureaux | 7f09e76 | 2021-05-05 09:20:18 +0200 | [diff] [blame] | 508 | initialDelaySeconds: 1 |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 509 | periodSeconds: 10 |
| 510 | timeoutSeconds: 1 |
| 511 | successThreshold: 1 |
| 512 | failureThreshold: 3 |
Sylvain Desbureaux | 7f09e76 | 2021-05-05 09:20:18 +0200 | [diff] [blame] | 513 | startupProbe: |
| 514 | ## Initializing the database could take some time |
| 515 | ## |
| 516 | enabled: true |
| 517 | initialDelaySeconds: 10 |
| 518 | periodSeconds: 10 |
| 519 | timeoutSeconds: 1 |
| 520 | successThreshold: 1 |
| 521 | # will wait up for initialDelaySeconds + failureThreshold*periodSeconds before |
| 522 | # stating startup wasn't good (910s per default) |
| 523 | failureThreshold: 90 |
vitalied | 1e5876c | 2018-03-29 10:24:27 -0500 | [diff] [blame] | 524 | |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 525 | ## Pod disruption budget configuration |
| 526 | ## |
| 527 | podDisruptionBudget: |
| 528 | ## Specifies whether a Pod disruption budget should be created |
| 529 | ## |
| 530 | create: true |
| 531 | minAvailable: 1 |
| 532 | # maxUnavailable: 1 |
Akansha Dua | 3fb95ef | 2019-09-04 11:47:43 +0000 | [diff] [blame] | 533 | |
Sylvain Desbureaux | 93a5b49 | 2020-11-27 11:07:42 +0100 | [diff] [blame] | 534 | ## Prometheus exporter configuration |
| 535 | ## |
| 536 | metrics: |
| 537 | ## Bitnami MySQL Prometheus exporter image |
| 538 | ## ref: https://hub.docker.com/r/bitnami/mysqld-exporter/tags/ |
| 539 | ## |
| 540 | image: bitnami/mysqld-exporter:0.12.1-debian-10-r264 |
| 541 | pullPolicy: Always |
| 542 | ## MySQL exporter additional command line flags |
| 543 | ## Can be used to specify command line flags |
| 544 | ## E.g.: |
| 545 | ## extraFlags: |
| 546 | ## - --collect.binlog_size |
| 547 | ## |
| 548 | extraFlags: [] |
| 549 | ## MySQL Prometheus exporter containers' resource requests and limits |
| 550 | ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ |
| 551 | ## |
| 552 | resources: |
| 553 | # We usually recommend not to specify default resources and to leave this as a conscious |
| 554 | # choice for the user. This also increases chances charts run on environments with little |
| 555 | # resources, such as Minikube. If you do want to specify resources, uncomment the following |
| 556 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. |
| 557 | limits: |
| 558 | cpu: 0.5 |
| 559 | memory: 256Mi |
| 560 | requests: |
| 561 | cpu: 0.5 |
| 562 | memory: 256Mi |
| 563 | ## MySQL Prometheus exporter service parameters |
| 564 | ## |
| 565 | service: |
| 566 | type: ClusterIP |
| 567 | port: 9104 |
| 568 | annotations: |
| 569 | prometheus.io/scrape: "true" |
| 570 | prometheus.io/port: "9104" |
| 571 | |
| 572 | ## Prometheus Operator ServiceMonitor configuration |
| 573 | ## |
| 574 | serviceMonitor: |
| 575 | enabled: false |
| 576 | ## Namespace in which Prometheus is running |
| 577 | ## |
| 578 | # namespace: monitoring |
| 579 | |
| 580 | ## Interval at which metrics should be scraped. |
| 581 | ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint |
| 582 | ## |
| 583 | # interval: 10s |
| 584 | |
| 585 | ## Timeout after which the scrape is ended |
| 586 | ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint |
| 587 | ## |
| 588 | # scrapeTimeout: 10s |
| 589 | |
| 590 | ## ServiceMonitor selector labels |
| 591 | ## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration |
| 592 | ## |
| 593 | selector: |
| 594 | prometheus: kube-prometheus |
| 595 | |
| 596 | ## RelabelConfigs to apply to samples before scraping |
| 597 | ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig |
| 598 | ## Value is evalued as a template |
| 599 | ## |
| 600 | relabelings: [] |
| 601 | |
| 602 | ## MetricRelabelConfigs to apply to samples before ingestion |
| 603 | ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig |
| 604 | ## Value is evalued as a template |
| 605 | ## |
| 606 | metricRelabelings: [] |
| 607 | # - sourceLabels: |
| 608 | # - "__name__" |
| 609 | # targetLabel: "__name__" |
| 610 | # action: replace |
| 611 | # regex: '(.*)' |
| 612 | # replacement: 'example_prefix_$1' |
| 613 | |
| 614 | ## Prometheus Operator PrometheusRule configuration |
| 615 | ## |
| 616 | prometheusRules: |
| 617 | enabled: false |
| 618 | |
| 619 | ## Additional labels to add to the PrometheusRule so it is picked up by the operator. |
| 620 | ## If using the [Helm Chart](https://github.com/helm/charts/tree/master/stable/prometheus-operator) this is the name of the Helm release and 'app: prometheus-operator' |
| 621 | selector: |
| 622 | app: prometheus-operator |
| 623 | release: prometheus |
| 624 | |
| 625 | ## Rules as a map. |
| 626 | rules: {} |
| 627 | # - alert: MariaDB-Down |
| 628 | # annotations: |
| 629 | # message: 'MariaDB instance {{ $labels.instance }} is down' |
| 630 | # summary: MariaDB instance is down |
| 631 | # expr: absent(up{job="mariadb-galera"} == 1) |
| 632 | # labels: |
| 633 | # severity: warning |
| 634 | # service: mariadb-galera |
| 635 | # for: 5m |