Skip to content

Commit

Permalink
Change tidb-discovery strategy type to Recreate (#2701)
Browse files Browse the repository at this point in the history
  • Loading branch information
weekface authored Jun 15, 2020
1 parent 0a154fb commit 37a7d57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/tidb-cluster/templates/discovery-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ metadata:
app.kubernetes.io/component: discovery
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
spec:
strategy:
type: Recreate
# don't modify this replicas
replicas: 1
selector:
Expand Down
1 change: 1 addition & 0 deletions pkg/manager/member/tidb_discovery_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ func getTidbDiscoveryDeployment(tc *v1alpha1.TidbCluster) (*appsv1.Deployment, e
d := &appsv1.Deployment{
ObjectMeta: meta,
Spec: appsv1.DeploymentSpec{
Strategy: appsv1.DeploymentStrategy{Type: appsv1.RecreateDeploymentStrategyType},
Replicas: controller.Int32Ptr(1),
Selector: l.LabelSelector(),
Template: corev1.PodTemplateSpec{
Expand Down

0 comments on commit 37a7d57

Please sign in to comment.