Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into add_more_event
Browse files Browse the repository at this point in the history
  • Loading branch information
Song Gao committed Apr 14, 2020
2 parents d9a2dac + 584210e commit 8c4e4c7
Show file tree
Hide file tree
Showing 37 changed files with 3,746 additions and 835 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ spec:
{{- end }}
- -pd-failover-period={{ .Values.controllerManager.pdFailoverPeriod | default "5m" }}
- -tikv-failover-period={{ .Values.controllerManager.tikvFailoverPeriod | default "5m" }}
- -tiflash-failover-period={{ .Values.controllerManager.tiflashFailoverPeriod | default "5m" }}
- -tidb-failover-period={{ .Values.controllerManager.tidbFailoverPeriod | default "5m" }}
- -v={{ .Values.controllerManager.logLevel }}
{{- if .Values.testMode }}
Expand Down
2 changes: 2 additions & 0 deletions charts/tidb-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ controllerManager:
tikvFailoverPeriod: 5m
# tidb failover period default(5m)
tidbFailoverPeriod: 5m
# tiflash failover period default(5m)
tiflashFailoverPeriod: 5m
## affinity defines pod scheduling rules,affinity default settings is empty.
## please read the affinity document before set your scheduling rule:
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
Expand Down
24 changes: 13 additions & 11 deletions cmd/controller-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,17 @@ import (
)

var (
printVersion bool
workers int
autoFailover bool
pdFailoverPeriod time.Duration
tikvFailoverPeriod time.Duration
tidbFailoverPeriod time.Duration
leaseDuration = 15 * time.Second
renewDuration = 5 * time.Second
retryPeriod = 3 * time.Second
waitDuration = 5 * time.Second
printVersion bool
workers int
autoFailover bool
pdFailoverPeriod time.Duration
tikvFailoverPeriod time.Duration
tidbFailoverPeriod time.Duration
tiflashFailoverPeriod time.Duration
leaseDuration = 15 * time.Second
renewDuration = 5 * time.Second
retryPeriod = 3 * time.Second
waitDuration = 5 * time.Second
)

func init() {
Expand All @@ -72,6 +73,7 @@ func init() {
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(&tiflashFailoverPeriod, "tiflash-failover-period", time.Duration(5*time.Minute), "TiFlash failover period default(5m)")
flag.DurationVar(&tidbFailoverPeriod, "tidb-failover-period", time.Duration(5*time.Minute), "TiDB failover period")
flag.DurationVar(&controller.ResyncDuration, "resync-duration", time.Duration(30*time.Second), "Resync time of informer")
flag.BoolVar(&controller.TestMode, "test-mode", false, "whether tidb-operator run in test mode")
Expand Down Expand Up @@ -179,7 +181,7 @@ func main() {
klog.Fatalf("failed to upgrade: %v", err)
}

tcController := tidbcluster.NewController(kubeCli, cli, genericCli, informerFactory, kubeInformerFactory, autoFailover, pdFailoverPeriod, tikvFailoverPeriod, tidbFailoverPeriod)
tcController := tidbcluster.NewController(kubeCli, cli, genericCli, informerFactory, kubeInformerFactory, autoFailover, pdFailoverPeriod, tikvFailoverPeriod, tidbFailoverPeriod, tiflashFailoverPeriod)
backupController := backup.NewController(kubeCli, cli, informerFactory, kubeInformerFactory)
restoreController := restore.NewController(kubeCli, cli, informerFactory, kubeInformerFactory)
bsController := backupschedule.NewController(kubeCli, cli, informerFactory, kubeInformerFactory)
Expand Down
3 changes: 2 additions & 1 deletion cmd/to-crdgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ package main
import (
"flag"
"fmt"
"os"

"github.com/pingcap/tidb-operator/pkg/to-crdgen/cmd"
"github.com/spf13/pflag"
"os"
)

func main() {
Expand Down
16 changes: 14 additions & 2 deletions docs/api-references/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
"TCPPort",
"HTTPPort",
"InternalServerHTTPPort",
"Errorlog",
"ErrorLog",
"ServerLog",
"TiDBStatusAddr",
"ServiceAddr",
"ProxyConfig",
"ClusterManagerPath",
"Flash",
"FlashStatus",
"FlashQuota",
"FlashUser",
Expand All @@ -27,7 +28,18 @@
"hideTypePatterns": [
"ParseError$",
"List$",
"DataResource"
"DataResource",
"ProxyConfig",
"^Flash$",
"FlashCluster",
"FlashStatus",
"FlashQuota",
"FlashUser",
"FlashProfile",
"FlashApplication",
"FlashProxy",
"FlashServerConfig",
"FlashRaft"
],
"externalPackages": [
{
Expand Down
Loading

0 comments on commit 8c4e4c7

Please sign in to comment.