Skip to content

Commit

Permalink
chore: add fallback role for backup (#981)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyelei authored Aug 27, 2024
1 parent 4190841 commit bd9cac8
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions addons/apecloud-mysql/templates/backuppolicytemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ spec:
- {{ include "apecloud-mysql.componentDefName" . }}
target:
role: follower
fallbackRole: leader
account: root
backupMethods:
- name: xtrabackup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
- {{ include "apecloud-mysql.componentDefName" . }}
target:
role: follower
fallbackRole: leader
account: root
backupMethods:
- name: volume-snapshot
Expand Down
1 change: 1 addition & 0 deletions addons/mogdb/templates/backuppolicytemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ spec:
- componentDefs: [mogdb-5]
target:
role: secondary
fallbackRole: primary
account: root
backupMethods:
- name: mogdb-basebackup
Expand Down
1 change: 1 addition & 0 deletions addons/mongodb/templates/backuppolicytemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
- componentDefs: [mongodb]
target:
role: secondary
fallbackRole: primary
account: root
backupMethods:
- name: dump
Expand Down
1 change: 1 addition & 0 deletions addons/mysql/templates/backuppolicytemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ spec:
- componentDefs: [mysql-5.7.44-orc, mysql-5.7.44, mysql-8.0.33-orc, mysql-8.0.33]
target:
role: secondary
fallbackRole: primary
account: root
backupMethods:
- name: xtrabackup
Expand Down
1 change: 1 addition & 0 deletions addons/mysql/templates/backuppolicytemplateforhscale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
- componentDefs: [mysql-5.7.44-orc, mysql-5.7.44, mysql-8.0.33-orc, mysql-8.0.33]
target:
role: secondary
fallbackRole: primary
backupMethods:
- name: xtrabackup
snapshotVolumes: false
Expand Down
2 changes: 2 additions & 0 deletions addons/postgresql/templates/backuppolicytemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ spec:
- componentDefs: [postgresql-14, postgresql-12]
target:
role: secondary
fallbackRole: primary
account: postgres
backupMethods:
- name: pg-basebackup
Expand Down Expand Up @@ -60,6 +61,7 @@ spec:
- name: wal-g
target:
role: secondary
fallbackRole: primary
account: postgres
actionSetName: postgres-wal-g
snapshotVolumes: false
Expand Down
2 changes: 2 additions & 0 deletions addons/postgresql/templates/componentdefinition-12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
serviceVersion: {{ .Values.componentServiceVersion.postgresql12 }}
serviceRefDeclarations:
- name: etcd
optional: true
serviceRefDeclarationSpecs:
- serviceKind: etcd
serviceVersion: "^*"
Expand Down Expand Up @@ -84,6 +85,7 @@ spec:
serviceRefVarRef:
name: etcd
endpoint: Required
optional: true
- name: POSTGRES_USER
valueFrom:
credentialVarRef:
Expand Down
2 changes: 2 additions & 0 deletions addons/postgresql/templates/componentdefinition-14.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
serviceVersion: {{ .Values.componentServiceVersion.postgresql14 }}
serviceRefDeclarations:
- name: etcd
optional: true
serviceRefDeclarationSpecs:
- serviceKind: etcd
serviceVersion: "^*"
Expand Down Expand Up @@ -84,6 +85,7 @@ spec:
serviceRefVarRef:
name: etcd
endpoint: Required
optional: true
- name: POSTGRES_USER
valueFrom:
credentialVarRef:
Expand Down
2 changes: 2 additions & 0 deletions addons/redis/templates/backuppolicytemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
- {{ include "redis.componentDefName" . }}
target:
role: secondary
fallbackRole: primary
account: default
backupMethods:
- name: datafile
Expand Down Expand Up @@ -40,6 +41,7 @@ spec:
- {{ include "redis-cluster.componentDefName" . }}
target:
role: secondary
fallbackRole: primary
account: default
backupMethods:
- name: datafile
Expand Down
1 change: 1 addition & 0 deletions addons/zookeeper/templates/backuppolicytemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ spec:
- componentDefs: [zookeeper]
target:
role: follower
fallbackRole: leader
backupMethods:
- name: zoocreeper
snapshotVolumes: false
Expand Down

0 comments on commit bd9cac8

Please sign in to comment.