From 8842010a84dc441bb090b283a039f89768486dd8 Mon Sep 17 00:00:00 2001 From: wangyelei Date: Sat, 8 Feb 2025 17:43:15 +0800 Subject: [PATCH 1/2] chore: improve mysql values.schema.json --- addons-cluster/mysql/values.schema.json | 40 ++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/addons-cluster/mysql/values.schema.json b/addons-cluster/mysql/values.schema.json index 8604aba1a..5f692d806 100644 --- a/addons-cluster/mysql/values.schema.json +++ b/addons-cluster/mysql/values.schema.json @@ -63,7 +63,7 @@ "topology": { "type": "string", "default": "server", - "description": "Topology type of the server", + "description": "Topology type of the serve. Note that under the orc/orc-proxysql topology, it is necessary to specify the Orchestrator cluster information. You should choose either orchestrator.cluster-service-selector or orchestrator.service-reference. This means that depending on your setup, you will configure one of these options to properly integrate with the Orchestrator service for managing your MySQL cluster.", "enum": [ "semisync", "semisync-proxysql", @@ -80,6 +80,44 @@ "memory": { "type": "number", "default": 1, "description": "Memory, the unit is Gi." } }, "description": "Proxysql configuration" + }, + "orchestrator": { + "type": "object", + "properties": { + "serviceReference": { + "type": "object", + "properties": { + "namespace": { + "type": "string", + "description": "Namespace of the service reference" + }, + "port": { + "type": "integer", + "description": "Port number of the service reference" + }, + "endpoint": { + "type": "string", + "description": "Endpoint name of the service reference" + } + }, + "additionalProperties": false + }, + "clusterServiceSelector": { + "type": "object", + "properties": { + "cluster": { + "type": "string", + "description": "orchestrator cluster name for service selector" + }, + "portName": { + "type": "string", + "description": "Port name for service selector" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false } } } From 3f669a814411bb4953eb5e1c0d2f3167a2c688f7 Mon Sep 17 00:00:00 2001 From: wangyelei Date: Sat, 8 Feb 2025 17:56:08 +0800 Subject: [PATCH 2/2] chore: improve mysql values.schema.json --- addons-cluster/mysql/templates/cluster.yaml | 8 ++++---- .../orchestrator-service-descriptor.yaml | 2 -- addons-cluster/mysql/values.schema.json | 16 ++++------------ addons-cluster/mysql/values.yaml | 7 +++---- 4 files changed, 11 insertions(+), 22 deletions(-) diff --git a/addons-cluster/mysql/templates/cluster.yaml b/addons-cluster/mysql/templates/cluster.yaml index 21993494b..dd91e50fb 100644 --- a/addons-cluster/mysql/templates/cluster.yaml +++ b/addons-cluster/mysql/templates/cluster.yaml @@ -19,17 +19,17 @@ spec: serviceRefs: {{- if eq .Values.orchestrator.clusterServiceSelector.cluster ""}} - name: orchestrator - namespace: {{ .Values.orchestrator.serviceReference.namespace | default .Release.Namespace }} + namespace: {{ .Release.Namespace }} serviceDescriptor: {{ include "kblib.clusterName" . }}-orc-descriptor {{- else }} - name: orchestrator - namespace: {{ .Values.orchestrator.serviceReference.namespace | default .Release.Namespace }} + namespace: {{ .Values.orchestrator.clusterServiceSelector.namespace | default .Release.Namespace }} clusterServiceSelector: - cluster: {{ .Values.orchestrator.clusterServiceSelector.cluster }} + cluster: {{ .Values.orchestrator.clusterServiceSelector.clusterName }} service: component: orchestrator service: orchestrator - port: {{ .Values.orchestrator.clusterServiceSelector.portName }} + port: orc-http credential: component: orchestrator name: orchestrator diff --git a/addons-cluster/mysql/templates/orchestrator-service-descriptor.yaml b/addons-cluster/mysql/templates/orchestrator-service-descriptor.yaml index 89ff52dd8..1be9727f1 100644 --- a/addons-cluster/mysql/templates/orchestrator-service-descriptor.yaml +++ b/addons-cluster/mysql/templates/orchestrator-service-descriptor.yaml @@ -10,7 +10,5 @@ spec: serviceVersion: 3.2.6 endpoint: value: {{ .Values.orchestrator.serviceReference.endpoint }} - port: - value: "{{ .Values.orchestrator.serviceReference.port }}" {{- end }} {{- end }} diff --git a/addons-cluster/mysql/values.schema.json b/addons-cluster/mysql/values.schema.json index 5f692d806..73d56340d 100644 --- a/addons-cluster/mysql/values.schema.json +++ b/addons-cluster/mysql/values.schema.json @@ -87,17 +87,9 @@ "serviceReference": { "type": "object", "properties": { - "namespace": { - "type": "string", - "description": "Namespace of the service reference" - }, - "port": { - "type": "integer", - "description": "Port number of the service reference" - }, "endpoint": { "type": "string", - "description": "Endpoint name of the service reference" + "description": "Endpoint name of the service reference, format: :" } }, "additionalProperties": false @@ -105,13 +97,13 @@ "clusterServiceSelector": { "type": "object", "properties": { - "cluster": { + "clusterName": { "type": "string", "description": "orchestrator cluster name for service selector" }, - "portName": { + "namespace": { "type": "string", - "description": "Port name for service selector" + "description": "orchestrator cluster namespace for service selector" } }, "additionalProperties": false diff --git a/addons-cluster/mysql/values.yaml b/addons-cluster/mysql/values.yaml index d20c857d5..b9555e205 100644 --- a/addons-cluster/mysql/values.yaml +++ b/addons-cluster/mysql/values.yaml @@ -43,9 +43,8 @@ orchestrator: # cluster_password: nb2wZpZ9OXXTF2Mv serviceReference: - namespace: "" - port: 80 + # format : endpoint: "myorc-orchestrator" clusterServiceSelector: - cluster: "" - portName: "orc-http" + clusterName: "" + namespace: ""