Skip to content

MariaDB cross-DC DR API types - #1792

Open
tamalsaha wants to merge 2 commits into
masterfrom
mariadb-dc-dr
Open

tamalsaha wants to merge 2 commits into
masterfrom
mariadb-dc-dr

Conversation

@tamalsaha

Copy link
Copy Markdown
Member

Adapts the Postgres DC-DR API work to MariaDB (a quorum based, multi-primary Galera engine). A distributed MariaDB is expanded by the operator into one self contained Galera cluster per Member data center; the cross-DC active DC decision is owned by the dr-controlplane primary-DC Lease and reflected on the single Database object.

Changes

  • apis/kubedb/v1/mariadb_types.go: add status.disasterRecovery (MariaDBDisasterRecoveryStatus, MariaDBDCStatus, MariaDBDRPhase{Steady,FailingOver,FailingBack,Degraded}). Per-DC view carries role, representative Galera node, writable, cross-DC async lag bytes, and health.
  • apis/ops/v1alpha1/mariadb_ops_types.go: add MariaDBHorizontalScalingDC and a dataCenters list on MariaDBHorizontalScalingSpec so an ops request scales each DC's intra-DC Galera quorum independently.
  • Regenerated deepcopy and the MariaDB ops CRD.

Mirrors the merged/in-flight Postgres DC-DR types. Dependent repos (mariadb operator, mariadb-coordinator) bump to this once released.

tamalsaha added 2 commits July 1, 2026 02:36
Add the per data center DC-DR view to MariaDB status, mirroring the
Postgres shape. A distributed MariaDB is expanded into one self contained
Galera cluster per Member DC; the cross-DC active DC decision is owned by
the dr-controlplane primary-DC Lease and reflected here on the single
Database object.

MariaDBDisasterRecoveryStatus carries the active DC, the DR phase, and a
per-DC view (role, representative node, writable, cross-DC async lag,
health). MariaDBDCStatus is one DC's local view.

Signed-off-by: Tamal Saha <tamal@appscode.com>
A distributed DC-DR MariaDB has one intra-DC Galera quorum per data center,
each scaled independently. Add MariaDBHorizontalScalingDC and a dataCenters
list on MariaDBHorizontalScalingSpec so an ops request can set per data
center local node counts instead of the single cluster wide member count.
Regenerate the ops CRD.

Signed-off-by: Tamal Saha <tamal@appscode.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant