From 0e086e4c121d54e17e7205bf49d849eea08acaad Mon Sep 17 00:00:00 2001 From: Sergiy Markin Date: Mon, 26 Feb 2024 15:35:16 +0000 Subject: [PATCH] [mariadb] Switch to ingress-less mariadb This PS switches mariadb to use primary service by default instead of ingress based deployment. The primary service that is getting created and automatically updated based on the leader election process in start.py entrypoint script. Mariadb primary service was introduced by this PS: https://review.opendev.org/c/openstack/openstack-helm-infra/+/905797 Change-Id: I4992276d0902d277a7a81f2730c22635b15794b0 --- mariadb/Chart.yaml | 2 +- mariadb/values.yaml | 16 +++++----- mariadb/values_overrides/ingress-service.yaml | 17 +++++++++++ mariadb/values_overrides/primary-service.yaml | 21 -------------- releasenotes/notes/mariadb.yaml | 1 + zuul.d/jobs.yaml | 29 ------------------- zuul.d/project.yaml | 2 -- 7 files changed, 27 insertions(+), 61 deletions(-) create mode 100644 mariadb/values_overrides/ingress-service.yaml delete mode 100644 mariadb/values_overrides/primary-service.yaml diff --git a/mariadb/Chart.yaml b/mariadb/Chart.yaml index ebe49e9aa..f45f47bc0 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.40 +version: 0.2.41 home: https://mariadb.com/kb/en/ icon: http://badges.mariadb.org/mariadb-badge-180x60.png sources: diff --git a/mariadb/values.yaml b/mariadb/values.yaml index 9daf08ab3..d9f0eabf4 100644 --- a/mariadb/values.yaml +++ b/mariadb/values.yaml @@ -363,7 +363,7 @@ conf: retry_after: 3600 container_name: throttle-backups-manager galera: - cluster_leader_ttl: 120 + cluster_leader_ttl: 60 database: mysql_histfile: "/dev/null" my: | @@ -605,7 +605,7 @@ endpoints: direct: mariadb-server discovery: mariadb-discovery error_pages: mariadb-ingress-error-pages - primary: mariadb-server-primary + primary: mariadb host_fqdn_override: default: null path: null @@ -690,11 +690,11 @@ manifests: certificates: false configmap_bin: true configmap_etc: true - configmap_ingress_conf: true - configmap_ingress_etc: true + configmap_ingress_conf: false + configmap_ingress_etc: false configmap_services_tcp: true - deployment_error: true - deployment_ingress: true + deployment_error: false + deployment_ingress: false job_image_repo_sync: true cron_job_mariadb_backup: false job_ks_user: false @@ -717,8 +717,8 @@ manifests: secret_etc: true secret_registry: true service_discovery: true - service_ingress: true - service_error: true + service_ingress: false + service_error: false service: true statefulset: true ... diff --git a/mariadb/values_overrides/ingress-service.yaml b/mariadb/values_overrides/ingress-service.yaml new file mode 100644 index 000000000..10825c07a --- /dev/null +++ b/mariadb/values_overrides/ingress-service.yaml @@ -0,0 +1,17 @@ +--- +manifests: + deployment_ingress: true + deployment_error: true + service_ingress: true + configmap_ingress_conf: true + configmap_ingress_etc: true + service_error: true +conf: + galera: + cluster_leader_ttl: 120 +endpoints: + oslo_db: + hosts: + default: mariadb + primary: mariadb-primary-service +... diff --git a/mariadb/values_overrides/primary-service.yaml b/mariadb/values_overrides/primary-service.yaml deleted file mode 100644 index 919dcea17..000000000 --- a/mariadb/values_overrides/primary-service.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -manifests: - deployment_ingress: false - deployment_error: false - service_ingress: false - configmap_ingress_conf: false - configmap_ingress_etc: false - service_error: false -volume: - size: 1Gi - backup: - size: 1Gi -conf: - galera: - cluster_leader_ttl: 10 -endpoints: - oslo_db: - hosts: - default: mariadb - primary: mariadb -... diff --git a/releasenotes/notes/mariadb.yaml b/releasenotes/notes/mariadb.yaml index 6ab298f2f..546417b9c 100644 --- a/releasenotes/notes/mariadb.yaml +++ b/releasenotes/notes/mariadb.yaml @@ -56,4 +56,5 @@ mariadb: - 0.2.38 Added throttling remote backups - 0.2.39 Template changes for image 1.9 compatibility - 0.2.40 Start.py allows to create mariadb-service-primary service and endpoint + - 0.2.41 Switch to primary service instead of ingress by default ... diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index ac07c80a9..3446c0452 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -255,35 +255,6 @@ - ./tools/deployment/openstack-support/120-powerdns.sh - ./tools/deployment/openstack-support/130-cinder.sh -- job: - name: openstack-helm-infra-openstack-support-mariadb-service-primary - parent: openstack-helm-infra-deploy - nodeset: openstack-helm-1node-ubuntu_focal - vars: - osh_params: - openstack_release: "2023.1" - container_distro_name: ubuntu - container_distro_version: focal - feature_gates: "ssl,primary-service" - gate_scripts: - - ./tools/deployment/openstack-support/000-prepare-k8s.sh - - ./tools/deployment/openstack-support/007-namespace-config.sh - - ./tools/deployment/common/ingress.sh - - ./tools/deployment/ceph/ceph.sh - - ./tools/deployment/openstack-support/025-ceph-ns-activate.sh - - ./tools/deployment/openstack-support/030-rabbitmq.sh - - ./tools/deployment/openstack-support/070-mariadb.sh - - ./tools/deployment/openstack-support/040-memcached.sh - - ./tools/deployment/openstack-support/051-libvirt-ssl.sh - - ./tools/deployment/openstack-support/060-openvswitch.sh - - ./tools/deployment/common/setup-client.sh - - ./tools/deployment/openstack-support/090-keystone.sh - - ./tools/deployment/openstack-support/100-ceph-radosgateway.sh - - ./tools/deployment/openstack-support/110-openstack-exporter.sh - - ./tools/deployment/openstack-support/120-powerdns.sh - - ./tools/deployment/openstack-support/130-cinder.sh - - - job: name: openstack-helm-infra-mariadb-operator parent: openstack-helm-infra-deploy diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index 78bfe1414..a547d937c 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -29,7 +29,6 @@ - openstack-helm-infra-openstack-support-ssl - openstack-helm-infra-metacontroller - openstack-helm-infra-mariadb-operator - - openstack-helm-infra-openstack-support-mariadb-service-primary - openstack-helm-compute-kit-dpdk-ubuntu_jammy gate: jobs: @@ -40,7 +39,6 @@ - openstack-helm-infra-openstack-support - openstack-helm-infra-openstack-support-rook - openstack-helm-infra-openstack-support-ssl - - openstack-helm-infra-openstack-support-mariadb-service-primary post: jobs: - publish-openstack-helm-charts