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