Skip to content

Commit

Permalink
chore: improve mysql values.schema.json (#1461)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyelei authored Feb 10, 2025
1 parent f07a6a8 commit 64bae93
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 11 deletions.
8 changes: 4 additions & 4 deletions addons-cluster/mysql/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,5 @@ spec:
serviceVersion: 3.2.6
endpoint:
value: {{ .Values.orchestrator.serviceReference.endpoint }}
port:
value: "{{ .Values.orchestrator.serviceReference.port }}"
{{- end }}
{{- end }}
32 changes: 31 additions & 1 deletion addons-cluster/mysql/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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: <host>:<port>"
}
},
"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
}
}
}
7 changes: 3 additions & 4 deletions addons-cluster/mysql/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ orchestrator:
# cluster_password: nb2wZpZ9OXXTF2Mv

serviceReference:
namespace: ""
port: 80
# format <host>:<port>
endpoint: "myorc-orchestrator"
clusterServiceSelector:
cluster: ""
portName: "orc-http"
clusterName: ""
namespace: ""

0 comments on commit 64bae93

Please sign in to comment.