From 32b571ab2fbc656e4f9991ff40fe5e9614617602 Mon Sep 17 00:00:00 2001 From: Vasyl Saienko Date: Sun, 15 Sep 2024 06:39:11 +0000 Subject: [PATCH] [mariadb] Avoid using cluster endpoints Switch to namespaced based endpoints to remove requirement configure kubernetes internal cluster domain name which can't be get from kubernetes API. Change-Id: I8808153a83e3cec588765797d66d728bb6133a5c --- mariadb/Chart.yaml | 2 +- .../monitoring/prometheus/secrets/_exporter_user.cnf.tpl | 2 +- mariadb/templates/secrets/_admin_user_internal.cnf.tpl | 2 +- mariadb/templates/statefulset.yaml | 2 +- releasenotes/notes/mariadb.yaml | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mariadb/Chart.yaml b/mariadb/Chart.yaml index e472e5812..7f2a034d0 100644 --- a/mariadb/Chart.yaml +++ b/mariadb/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v10.6.7 description: OpenStack-Helm MariaDB name: mariadb -version: 0.2.45 +version: 0.2.46 home: https://mariadb.com/kb/en/ icon: http://badges.mariadb.org/mariadb-badge-180x60.png sources: diff --git a/mariadb/templates/monitoring/prometheus/secrets/_exporter_user.cnf.tpl b/mariadb/templates/monitoring/prometheus/secrets/_exporter_user.cnf.tpl index c86fc01f2..8f14827e7 100644 --- a/mariadb/templates/monitoring/prometheus/secrets/_exporter_user.cnf.tpl +++ b/mariadb/templates/monitoring/prometheus/secrets/_exporter_user.cnf.tpl @@ -15,7 +15,7 @@ limitations under the License. [client] user = {{ .Values.endpoints.oslo_db.auth.exporter.username }} password = {{ .Values.endpoints.oslo_db.auth.exporter.password }} -host = {{ tuple "oslo_db" "internal" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} +host = {{ tuple "oslo_db" "internal" . | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} port = {{ tuple "oslo_db" "direct" "mysql" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- if .Values.manifests.certificates }} ssl-ca = /etc/mysql/certs/ca.crt diff --git a/mariadb/templates/secrets/_admin_user_internal.cnf.tpl b/mariadb/templates/secrets/_admin_user_internal.cnf.tpl index fa0d09a55..8bda8da01 100644 --- a/mariadb/templates/secrets/_admin_user_internal.cnf.tpl +++ b/mariadb/templates/secrets/_admin_user_internal.cnf.tpl @@ -15,7 +15,7 @@ limitations under the License. [client] user = {{ .Values.endpoints.oslo_db.auth.admin.username }} password = {{ .Values.endpoints.oslo_db.auth.admin.password }} -host = {{ tuple "oslo_db" "internal" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} +host = {{ tuple "oslo_db" "internal" . | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} port = {{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{- if .Values.manifests.certificates }} ssl-ca = /etc/mysql/certs/ca.crt diff --git a/mariadb/templates/statefulset.yaml b/mariadb/templates/statefulset.yaml index d706a2772..de2f1bfd5 100644 --- a/mariadb/templates/statefulset.yaml +++ b/mariadb/templates/statefulset.yaml @@ -181,7 +181,7 @@ spec: - name: POD_NAME_PREFIX value: {{ tuple "oslo_db" "direct" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - name: DISCOVERY_DOMAIN - value: {{ tuple "oslo_db" "discovery" . | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} + value: {{ tuple "oslo_db" "discovery" . | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} - name: DIRECT_SVC_NAME value: {{ tuple "oslo_db" "direct" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - name: WSREP_PORT diff --git a/releasenotes/notes/mariadb.yaml b/releasenotes/notes/mariadb.yaml index 4f8a769d1..d7f85256d 100644 --- a/releasenotes/notes/mariadb.yaml +++ b/releasenotes/notes/mariadb.yaml @@ -61,4 +61,5 @@ mariadb: - 0.2.43 Add 2024.1 Ubuntu Jammy overrides - 0.2.44 Uplift ingress controller image to 1.11.2 - 0.2.45 Add mariadb controller support + - 0.2.46 Avoid using cluster endpoints ...