51 Commits

Author SHA1 Message Date
2485c599d5 Fix v25 2025-07-28 15:33:30 +02:00
e023a6e6ed Address pr comments 2025-07-15 11:47:27 +02:00
8387526a6a Convert SyncBinlog to integer 2025-07-15 11:47:27 +02:00
4ff1a3a321 Fix linting 2025-07-08 21:32:04 +02:00
676856c09f Redo typos approach 2025-05-15 18:29:54 +02:00
801bf04266 Stub at unnamed replication connection 2025-03-26 15:51:25 +01:00
e374d1e6bd Support for TLS in replication 2025-01-28 11:22:39 +01:00
20d5497506 Support for TLS in CHANGE MASTER SQL statement 2025-01-28 11:22:39 +01:00
1a322f244f Use accountName for AlterUser 2024-11-05 12:13:47 +01:00
a3743b8513 Support replication for non-default port
fix port error
2024-10-29 18:04:46 +01:00
a94a882a9f Added own reference types 2024-09-23 18:13:20 +02:00
a3b1f0c3cb Make AlterUser build the query, like CreateUser does 2024-08-16 16:56:45 +02:00
022e4d0f5b Using short FQDN in CHANGE MASTER statement to be compatible with MariaDB 10.5 2024-07-01 15:22:33 +02:00
c850b0457c Initial user managed by CRs 2024-06-03 12:11:19 +02:00
2979ced53e Initial database created via Database CR 2024-06-03 12:11:19 +02:00
b81e0cfe05 Support for bettwer user reconciliation at the SQL level 2024-05-31 14:48:49 +02:00
f9fd46cf7f Refactor replication password generation 2024-04-30 13:39:51 +02:00
48274e5dac Fixed replication password generation 2024-04-30 13:39:51 +02:00
fc0de8cf29 Opt-in password generation 2024-04-30 13:39:51 +02:00
49987ad503 Optional password in User CR. Locking account and expiring password if not provided 2024-04-29 14:49:54 +02:00
64afdb1d69 Refactor meta support for Secret 2024-04-02 14:14:38 +02:00
ce6762af62 Added maxscale client 2024-01-25 15:59:04 +01:00
6f01e43497 Moved resource keys to API pkg 2023-12-12 14:04:55 +01:00
a79e1b9cdf Decouple SQL module from API for better reusability 2023-12-03 20:10:44 +01:00
333adf3b74 Renamed pkgs to singular 2023-10-10 15:43:45 +03:00
b25c694a80 Fix broken replication. issue #231 2023-09-27 18:20:26 +02:00
1e92104e16 BREAKING CHANGE: align ReplicationReconciler with GaleraReconciler.
See #197 for details.
2023-08-29 22:21:32 +02:00
b112d4b2e2 Review - Changed the Grant and Revoke API
Changed the function signature of the `Grant` and `Revoke` method from the MariaDB client.

https://github.com/mariadb-operator/mariadb-operator/pull/176#discussion_r1279679605
2023-08-01 10:06:40 +02:00
3fc1d8f284 Added the hostname attribute to the Grant CRD
Added a new attribute to the `Grant` CRD to configure the hostname of the account name.
2023-08-01 10:06:40 +02:00
f6bc674511 Added the hostname attribute to the User CRD
Added a new attribute to the `User` CRD to configure the hostname of the account name.
2023-08-01 10:06:40 +02:00
b3e33467e3 Allow the user to specify repl password 2023-07-31 22:17:34 +02:00
97c21a5172 Idempotently creating repl user 2023-07-31 22:17:34 +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
2b26ade967 Fix typo 2023-05-22 18:56:09 +02:00
2754610193 Support for sync_binlog in replication 2023-05-22 18:53:24 +02:00
cb8ccad48f Using read_only to lock primary during switchover 2023-05-22 18:23:08 +02:00
1b7060fc4f Support for gtid in replication 2023-05-22 18:09:18 +02:00
86ff417089 Fixed metrics exporter compatibility with HA 2023-05-10 22:33:50 +02:00
17cba6e890 Refactored status conditions to enable better synchronization between controllers 2023-05-06 22:08:22 +02:00
886fc1867c Refactored pkgs 2023-05-01 22:09:50 +02:00
d4de922950 Refactored primary failover 2023-05-01 22:09:50 +02:00
c1027695dd Fixed repl password secret 2023-05-01 22:09:50 +02:00
07f1644462 Flushing privileges 2023-05-01 22:09:50 +02:00
8a450d7a46 Moved primary sql objects to ReplicationConfig 2023-05-01 22:09:50 +02:00
31001bb0da Improved feedback to user when switching primary 2023-05-01 22:09:50 +02:00
f30bd80dfa Reconciling Pods in Ready state 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
f86c900b1c Using primary binlog GTID when setting up replicas 2023-04-26 23:15:13 +02:00
a3df5d8d55 Renaming replication config methods 2023-04-26 23:15:13 +02:00