Skip to content

Commit

Permalink
chore: polardb uses consensusSpec when workloadType is Consensus
Browse files Browse the repository at this point in the history
  • Loading branch information
shanshanying committed Oct 9, 2024
1 parent 2e8261a commit 0152ad6
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions addons/polardbx/templates/clusterDefintion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,21 @@ spec:
defaultMode: 0555
workloadType: Consensus
characterType: polardbx
rsmSpec:
roles:
- name: "leader"
accessMode: ReadWrite
isLeader: true
canVote: true
- name: "follower"
consensusSpec:
leader:
name: leader
accessMode: ReadWrite
followers:
- name: follower
accessMode: Readonly
canVote: true
roleProbe:
roleUpdateMechanism: DirectAPIServerEventUpdate
customHandler:
- image: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.roleProbe.image.repository }}:{{ .Values.roleProbe.image.tag }}
command:
- sh
- -c
- |
- |
mysql -h127.0.0.1 -P3306 -uroot -N -B -e "select role from information_schema.alisql_cluster_local" | xargs echo -n
memberUpdateStrategy: Serial
service:
Expand Down Expand Up @@ -231,15 +229,13 @@ spec:
- name: GMS_SVC_NAME
valueFrom:
type: ServiceRef
rsmSpec:
roles:
- name: "leader"
accessMode: ReadWrite
isLeader: true
canVote: true
- name: "follower"
consensusSpec:
leader:
name: leader
accessMode: ReadWrite
followers:
- name: follower
accessMode: Readonly
canVote: true
roleProbe:
roleUpdateMechanism: DirectAPIServerEventUpdate
customHandler:
Expand Down

0 comments on commit 0152ad6

Please sign in to comment.