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