Skip to content

MariaDB operator uses hardcoded cluster domain instead of global value #2348

Open

Description

@myasnikovdaniil

Description

The mariadb-operator system package has a hardcoded clusterName: cozy.local in its values, instead of using the global cluster domain from _cluster.cluster-domain. This causes MariaDB to use the wrong internal domain name on clusters where the domain is not cozy.local, breaking database connectivity.

Current behavior

In packages/system/mariadb-operator/values.yaml:

mariadb-operator:
  clusterName: cozy.local

This value is used by the operator deployment (CLUSTER_NAME env var) and webhook certificate DNS names. When the actual cluster domain differs from cozy.local, MariaDB instances cannot resolve services correctly.

Users have to manually override the cozystack.mariadb-operator package specs and recreate databases to work around this.

Expected behavior

The mariadb-operator should use the cluster domain from the global _cluster configuration, consistent with how other packages handle it:

{{ (index .Values._cluster "cluster-domain") | default "cozy.local" }}

This pattern is already used by: mongodb, foundationdb, opensearch, nats, and others.

Suggested fix

  1. Pass _cluster.cluster-domain into the mariadb-operator chart values via the template layer
  2. Remove the hardcoded clusterName: cozy.local from values.yaml
  3. Set clusterName dynamically from the global cluster domain value

Affected files

  • packages/system/mariadb-operator/values.yaml — hardcoded value
  • packages/system/mariadb-operator/charts/mariadb-operator/templates/operator/deployment.yaml — uses clusterName
  • packages/system/mariadb-operator/charts/mariadb-operator/templates/cert-controller/deployment.yaml — uses clusterName
  • packages/system/mariadb-operator/charts/mariadb-operator/templates/webhook/certificate.yaml — uses clusterName

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug
    on Apr 6, 2026
  2. added
    area/databaseIssues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)
    priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release
    triage/acceptedIndicates an issue is ready to be actively worked on
    on Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/databaseIssues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)kind/bugCategorizes issue or PR as related to a bugpriority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next releasetriage/acceptedIndicates an issue is ready to be actively worked on

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions