move mysql operator and cluster
This commit is contained in:
29
deploy/mysql-operator/templates/orchestrator-config.yaml
Normal file
29
deploy/mysql-operator/templates/orchestrator-config.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
{{- $replicas := int .Values.replicaCount }}
|
||||
{{- $raftNodes := include "orchestrator.raftList" . | splitList "," }}
|
||||
{{- $conf := .Values.orchestrator.config }}
|
||||
{{- $_ := set $conf "ListenAddress" ":3000" }}
|
||||
{{- $_ := set $conf "MySQLTopologyCredentialsConfigFile" "/etc/orchestrator/orc-topology.cnf" }}
|
||||
{{- $_ := set $conf "BackendDB" "sqlite" }}
|
||||
{{- $_ := set $conf "SQLite3DataFile" "/var/lib/orchestrator/orc.db" }}
|
||||
{{- $_ := set $conf "RaftEnabled" true }}
|
||||
{{- $_ := set $conf "RaftDataDir" "/var/lib/orchestrator" }}
|
||||
{{- $_ := set $conf "RaftAdvertise" "{{ .Env.HOSTNAME }}-orc-svc" }}
|
||||
{{- $_ := set $conf "RaftBind" "{{ .Env.HOSTNAME }}"}}
|
||||
{{- $_ := set $conf "HTTPAdvertise" "http://{{ .Env.HOSTNAME }}-orc-svc:80" }}
|
||||
{{- if eq 1 $replicas -}}
|
||||
{{- $_ := set $conf "RaftNodes" (list) }}
|
||||
{{- else -}}
|
||||
{{- $_ := set $conf "RaftNodes" $raftNodes }}
|
||||
{{- end -}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "orchestrator.fullname" . }}
|
||||
labels:
|
||||
{{- include "mysql-operator.labels" . | nindent 4 }}
|
||||
data:
|
||||
orchestrator.conf.json: {{ toPrettyJson $conf | quote }}
|
||||
orc-topology.cnf: |
|
||||
[client]
|
||||
user = {{ printf "{{ .Env.ORC_TOPOLOGY_USER }}" }}
|
||||
password = {{ printf "{{ .Env.ORC_TOPOLOGY_PASSWORD }}" }}
|
||||
Reference in New Issue
Block a user