Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typo and other issues #2242

Merged
merged 11 commits into from
Apr 23, 2020
2 changes: 1 addition & 1 deletion docs/api-references/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2560,7 +2560,7 @@ int64
</tr>
<tr>
<td>
<code>loger</code></br>
<code>logger</code></br>
<em>
<a href="#pingcap.com/v1alpha1.FlashLogger">
FlashLogger
Expand Down
2 changes: 1 addition & 1 deletion manifests/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5080,7 +5080,7 @@ spec:
format: double
type: number
type: object
loger:
logger:
description: FlashLogger is the configuration of [logger]
section.
properties:
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pingcap/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/pingcap/v1alpha1/tiflash_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ type CommonConfig struct {
// +optional
Flash *Flash `json:"flash,omitempty" toml:"flash,omitempty"`
// +optional
FlashLogger *FlashLogger `json:"loger,omitempty" toml:"logger,omitempty"`
FlashLogger *FlashLogger `json:"logger,omitempty" toml:"logger,omitempty"`
// +optional
// +k8s:openapi-gen=false
FlashApplication *FlashApplication `json:"application,omitempty" toml:"application,omitempty"`
Expand Down
12 changes: 11 additions & 1 deletion pkg/manager/member/pd_member_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,17 @@ func getPDConfigMap(tc *v1alpha1.TidbCluster) (*corev1.ConfigMap, error) {
config.Dashboard.TiDBCertPath = path.Join(tidbClientCertPath, corev1.TLSCertKey)
config.Dashboard.TiDBKeyPath = path.Join(tidbClientCertPath, corev1.TLSPrivateKeyKey)
}

// TiFlash requires PD to enable the `replication.enable-placement-rules`
// Check detail in https://pingcap.com/docs/stable/reference/tiflash/deploy/
if tc.Spec.TiFlash != nil {
if config.Replication == nil {
config.Replication = &v1alpha1.PDReplicationConfig{}
}
if config.Replication.EnablePlacementRules == nil {
enable := true
config.Replication.EnablePlacementRules = &enable
}
}
confText, err := MarshalTOML(config)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion pkg/manager/member/tiflash_member_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ func getNewStatefulSet(tc *v1alpha1.TidbCluster, cm *corev1.ConfigMap) (*apps.St
},
{
Name: "TZ",
Value: tc.Spec.Timezone,
Value: tc.Timezone(),
},
}
tiflashContainer := corev1.Container{
Expand Down