Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve mysql values.schema.json #1461

Merged
merged 2 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: ""