Skip to content

Commit

Permalink
turn automitic failover on (#667)
Browse files Browse the repository at this point in the history
(cherry picked from commit a98f437)
  • Loading branch information
weekface committed Jul 29, 2019
1 parent dbd2255 commit d5130d4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
- /usr/local/bin/tidb-controller-manager
- -default-storage-class-name={{ .Values.defaultStorageClassName }}
- -cluster-scoped={{ .Values.clusterScoped }}
- -auto-failover={{ .Values.controllerManager.autoFailover | default false }}
- -auto-failover={{ .Values.controllerManager.autoFailover | default true }}
- -pd-failover-period={{ .Values.controllerManager.pdFailoverPeriod | default "5m" }}
- -tikv-failover-period={{ .Values.controllerManager.tikvFailoverPeriod | default "5m" }}
- -tidb-failover-period={{ .Values.controllerManager.tidbFailoverPeriod | default "5m" }}
Expand Down
2 changes: 1 addition & 1 deletion charts/tidb-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ controllerManager:
cpu: 80m
memory: 50Mi
# autoFailover is whether tidb-operator should auto failover when failure occurs
autoFailover: false
autoFailover: true
# pd failover period default(5m)
pdFailoverPeriod: 5m
# tikv failover period default(5m)
Expand Down
2 changes: 1 addition & 1 deletion cmd/controller-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func init() {
flag.IntVar(&workers, "workers", 5, "The number of workers that are allowed to sync concurrently. Larger number = more responsive management, but more CPU (and network) load")
flag.BoolVar(&controller.ClusterScoped, "cluster-scoped", true, "Whether tidb-operator should manage kubernetes cluster wide TiDB Clusters")
flag.StringVar(&controller.DefaultStorageClassName, "default-storage-class-name", "standard", "Default storage class name")
flag.BoolVar(&autoFailover, "auto-failover", false, "Auto failover")
flag.BoolVar(&autoFailover, "auto-failover", true, "Auto failover")
flag.DurationVar(&pdFailoverPeriod, "pd-failover-period", time.Duration(5*time.Minute), "PD failover period default(5m)")
flag.DurationVar(&tikvFailoverPeriod, "tikv-failover-period", time.Duration(5*time.Minute), "TiKV failover period default(5m)")
flag.DurationVar(&tidbFailoverPeriod, "tidb-failover-period", time.Duration(5*time.Minute), "TiDB failover period")
Expand Down
2 changes: 1 addition & 1 deletion images/tidb-operator-e2e/tidb-operator-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ controllerManager:
cpu: 80m
memory: 50Mi
# autoFailover is whether tidb-operator should auto failover when failure occurs
autoFailover: false
autoFailover: true
# pd failover period default(5m)
pdFailoverPeriod: 5m
# tidb failover period default(5m)
Expand Down

0 comments on commit d5130d4

Please sign in to comment.