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