Files
cozystack/packages/system
Алексей Артамонов b5a09cd14b fix(mariadb): re-guard replication so single-replica passes the operator webhook
PR #2279 made `replication.enabled: true` unconditional so the operator would
always create -primary/-secondary services. But the mariadb-operator validating
webhook (vmariadb-v1alpha1.kb.io) rejects replication when spec.replicas == 1,
so single-replica MariaDB could no longer be created — the HelmRelease never
became Ready.

Re-guard replication on replicas>1 and teach the service-name consumers about
the bare <release> service the operator provisions in both topologies:

- mariadb.yaml: gate `replication` on replicas>1; restore single-replica
  external access via `service.type: LoadBalancer` and keep `primaryService`
  LoadBalancer for replicas>1 only.
- backup-cronjob.yaml: route single-replica dumps to the bare service
  (no -secondary exists without replication).
- dashboard-resourcemap.yaml: always grant RBAC on the bare service, plus
  -primary/-secondary when replicas>1, matching the ApplicationDefinition.
- mariadb-rd: list the bare service in services.include so single-replica
  installs are visible in the dashboard.

Adds a single-replica e2e test that reproduces the webhook rejection and
guards against regression.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Алексей Артамонов <alexeyartamonov1987@gmail.com>
(cherry picked from commit c7e8f4d975)
2026-07-02 19:54:31 +00:00
..
2026-06-24 01:42:54 +00:00
2026-03-25 15:57:25 +05:00
2026-06-24 01:42:54 +00:00
2026-06-24 01:42:54 +00:00
2026-06-24 01:42:54 +00:00
2026-06-24 01:42:54 +00:00
2026-06-24 01:42:54 +00:00
2026-06-24 01:42:54 +00:00
2026-06-24 01:42:54 +00:00
2026-06-24 01:42:54 +00:00
2026-06-24 01:42:54 +00:00
2026-06-24 01:42:54 +00:00
2026-06-24 01:42:54 +00:00
2026-02-10 20:19:03 +01:00
2026-06-24 01:42:54 +00:00
2026-01-20 03:24:32 +01:00
2026-06-24 01:42:54 +00:00
2026-03-25 15:57:25 +05:00
2026-06-24 01:42:54 +00:00
2026-02-17 22:54:12 +01:00
2026-01-20 03:24:32 +01:00