Commit Graph

20 Commits

Author SHA1 Message Date
2dfbf966d1 Support for MariaDB 11 2023-07-21 18:11:44 +02:00
73870ea820 Removed default storage classes 2023-07-16 20:35:47 +02:00
09742af304 Image made mutable to be able to upgrade 2023-07-08 20:12:09 +02:00
d247595a05 Defaulting Galera object via webhook (#148)
* Defaulting Galera object via webhook

* Enhanced support for Galera defaults allowing to disable defaulting webhook

* Bump init
2023-07-08 17:04:56 +02:00
b0fda15c0e Allow only one HA method in validation webhook 2023-07-07 17:38:30 +02:00
8902cb94a5 Multi master HA via Galera. Automatic Galera cluster recovery (#122)
* Types and scaffoling

* Galera config

* ConfigMap reconciliation

* Built galera StatefulSet

* Galera service

* Fixed replication service

* Using internal service in galera config

* Fix galera config

* Galera init container

* Publishing non ready addresses in MariaDB headless service

* Ignoring ConfigMap and Service errors during reconciliation

* Galera bootstrapping improvements

* Setting configure Galera status condition

* Update primary name

* Simpler primary name for galera

* Primary pod header

* Refactored pod reconciler to enable better extensibility

* Added pod galera reconciler

* Simplified approach and removed pod galera reconciler

* Galera crash recovery template implementation

* Refactored and documented galera flow

* Missing .PHONY

* Moved common container properties to ContainerTemplate

* Added types for galera agent

* Apply CRDs server side

* Using metrics exporter port from CRD

* Building containers from container template

* Configured sidecar agent

* Fixed agent config path

* Configured local IPs for mariadb internal

* Added log lines in initcontainer

* Imported agent client

* Disabled bootstrap via agent

* Getting galera state to determine cluster health

* Increased galera example resources

* Added galera health spec

* DR make targets

* Added galera configured condition

* Fixed quotes

* Moved replication clientset to client pkg

* Detecting galera non healthy

* Simplified galera API

* Support for command and args in container template

* Added agent graceful shutdown

* Minor improvement

* Galera state by Pod

* Bootstrapping from Pods with SafeToBootstrap

* Logging improvements

* Passing down status during recovery

* Mod tidy

* Added RBAC to delete Pods to be able to perform recovery

* Recovery by pod

* Persist galera recovery

* Primer recovery

* Increase default initialDelaySeconds and terminationGracePeriodSeconds of default galera probe

* Discarding -1 sequence numbers

* Remove return that was preventing MariaDB to become ready

* Cleanup galera recovery status

* API renamings

* Notable improvements in recovery

* Deleting Pod after bootstrapping cluster

* Renaming polling methods and contexts

* Changed log time encoder in dev

* Improved recovery status initialization

* Moved cluster recovery to its own func

* Pod recovery structure

* Dedicated loggers for cluster and pod recovery

* Removed TODO

* Added HA annotations to StatefulSet

* Moved galera health logic to a dedicated controller

* Fixed bug in recovery when passing Pod refs to goroutines

* Configured parallel pod management. Rely on the init container to do the ordered ready initial deployment

* Support for SST

* Improved galera probes

* Unify internal service for HA

* Renamed galera health to statefulset galera reconciler

* Concurrent safe clientset

* Pod recovery

* Added bootstrap pod to galera recovery status

* Removed TODO

* Added tests for Galera

* Moved HA PDB to mariadb controller

* Moved primary connection and service to mariadb controller

* Adjusted mariadb galera timeouts for test

* Deleting Pods synchronously

* Minimize SQL conns during healtchecks

* Test adjustments

* Revert "Minimize SQL conns during healtchecks"

This reverts commit fc6d10e188.

* Test adjustments

* Well defined test timeouts

* Moved galera and replication to different test suites

* Increase test timeout and verbosity

* Added recovery status tests

* All Pods during recovery must be obtain to avoid split brains

* Galera validation

* Fix debug logs

* Improved log structure

* Added galera events

* Update comment in webhook.enable helm value

* Support for opting out from galera recovery

* Tweak mariadb galera test timeouts

* Revert "Support for opting out from galera recovery"

This reverts commit d82af45216.

* Removed bash initcontainer in favor of go initcontainer

* Pod recovery notably improved

* Support for opting out from galera recovery
2023-07-04 21:53:00 +02:00
2754610193 Support for sync_binlog in replication 2023-05-22 18:53:24 +02:00
1b7060fc4f Support for gtid in replication 2023-05-22 18:09:18 +02:00
92186a4f0f Support for mutable bootstrapFrom 2023-05-13 18:04:15 +02:00
0dabeb6a64 Bump MariaDB default version to LTS 2023-05-13 13:18:52 +02:00
17cba6e890 Refactored status conditions to enable better synchronization between controllers 2023-05-06 22:08:22 +02:00
0d37958084 Drop support for physical backups, as it doesn't fit with the newest HA feature. Backup support will be refactored the future when supporting S3 compatible storage. 2023-05-06 22:08:22 +02:00
7d2d6ba900 Webhook to disallow podIndex and automaticFailover during ongoing switchovers 2023-05-01 22:09:50 +02:00
77ea1aa162 Refactored replication API 2023-04-26 23:15:13 +02:00
3de4d7b824 Resetting slave on failure 2023-04-26 23:15:13 +02:00
49695d04ad Support for master switchover in MariaDB replication
Co-authored-by: eloylp <eloylp@eloylp.dev>
Signed-off-by: Martin Montes <martin11lrx@gmail.com>
2023-04-18 21:59:17 +02:00
c1e67064b0 Support for pod disruption budget 2023-03-31 22:57:31 +02:00
039dd3690d High availability via Async/SemiSync replication 2023-03-28 00:37:02 +02:00
a60b4c8666 Migrated to GitHub organization and GHCR registry 2023-03-18 15:57:40 +01:00
dc4c33ac8e COMMUNITY REQUEST - Support for custom my.cnf. Closes #51 2023-03-04 00:01:56 +01:00