Repository navigation
MariaDB operator uses hardcoded cluster domain instead of global value #2348
Description
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.localThis 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
- Pass
_cluster.cluster-domaininto the mariadb-operator chart values via the template layer - Remove the hardcoded
clusterName: cozy.localfromvalues.yaml - Set
clusterNamedynamically from the global cluster domain value
Affected files
packages/system/mariadb-operator/values.yaml— hardcoded valuepackages/system/mariadb-operator/charts/mariadb-operator/templates/operator/deployment.yaml— usesclusterNamepackages/system/mariadb-operator/charts/mariadb-operator/templates/cert-controller/deployment.yaml— usesclusterNamepackages/system/mariadb-operator/charts/mariadb-operator/templates/webhook/certificate.yaml— usesclusterName
Activity