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 8604aba1a..73d56340d 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,36 @@ "memory": { "type": "number", "default": 1, "description": "Memory, the unit is Gi." } }, "description": "Proxysql configuration" + }, + "orchestrator": { + "type": "object", + "properties": { + "serviceReference": { + "type": "object", + "properties": { + "endpoint": { + "type": "string", + "description": "Endpoint name of the service reference, format: :" + } + }, + "additionalProperties": false + }, + "clusterServiceSelector": { + "type": "object", + "properties": { + "clusterName": { + "type": "string", + "description": "orchestrator cluster name for service selector" + }, + "namespace": { + "type": "string", + "description": "orchestrator cluster namespace for service selector" + } + }, + "additionalProperties": false + } + }, + "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: ""