Skip to content

Commit

Permalink
tiproxy: revert enable SSL by default
Browse files Browse the repository at this point in the history
Signed-off-by: xhe <[email protected]>
  • Loading branch information
xhebox committed Jun 20, 2023
1 parent 0015c82 commit 647461d
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/api-references/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -22592,13 +22592,13 @@ int32
</tr>
<tr>
<td>
<code>sslDisableTiDB</code></br>
<code>sslEnableTiDB</code></br>
<em>
bool
</em>
</td>
<td>
<p>Whether disable SSL connection between tiproxy and TiDB server</p>
<p>Whether enable SSL connection between tiproxy and TiDB server</p>
</td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion manifests/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34235,7 +34235,7 @@ spec:
type: string
serviceAccount:
type: string
sslDisableTiDB:
sslEnableTiDB:
type: boolean
statefulSetUpdateStrategy:
type: string
Expand Down
2 changes: 1 addition & 1 deletion manifests/crd/v1/pingcap.com_tidbclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19617,7 +19617,7 @@ spec:
type: string
serviceAccount:
type: string
sslDisableTiDB:
sslEnableTiDB:
type: boolean
statefulSetUpdateStrategy:
type: string
Expand Down
2 changes: 1 addition & 1 deletion manifests/crd/v1beta1/pingcap.com_tidbclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19587,7 +19587,7 @@ spec:
type: string
serviceAccount:
type: string
sslDisableTiDB:
sslEnableTiDB:
type: boolean
statefulSetUpdateStrategy:
type: string
Expand Down
2 changes: 1 addition & 1 deletion manifests/crd_v1beta1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34189,7 +34189,7 @@ spec:
type: string
serviceAccount:
type: string
sslDisableTiDB:
sslEnableTiDB:
type: boolean
statefulSetUpdateStrategy:
type: string
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/pingcap/v1alpha1/openapi_generated.go

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

4 changes: 2 additions & 2 deletions pkg/apis/pingcap/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -774,8 +774,8 @@ type TiProxySpec struct {
// +kubebuilder:validation:Minimum=0
Replicas int32 `json:"replicas"`

// Whether disable SSL connection between tiproxy and TiDB server
SSLDisableTiDB bool `json:"sslDisableTiDB,omitempty"`
// Whether enable SSL connection between tiproxy and TiDB server
SSLEnableTiDB bool `json:"sslEnableTiDB,omitempty"`

// TLSClientSecretName is the name of secret which stores tidb server client certificate
// used by TiProxy to check health status.
Expand Down
4 changes: 2 additions & 2 deletions pkg/manager/member/tiproxy_member_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (m *tiproxyMemberManager) syncConfigMap(tc *v1alpha1.TidbCluster, set *apps
cfgWrapper.Set("security.server-tls.cert", path.Join(tiproxyServerPath, "tls.crt"))
cfgWrapper.Set("security.server-tls.skip-ca", true)

if !tc.Spec.TiProxy.SSLDisableTiDB || !tc.SkipTLSWhenConnectTiDB() {
if tc.Spec.TiProxy.SSLEnableTiDB || !tc.SkipTLSWhenConnectTiDB() {
if tc.Spec.TiDB.TLSClient.SkipInternalClientCA {
cfgWrapper.Set("security.sql-tls.skip-ca", true)
} else {
Expand Down Expand Up @@ -440,7 +440,7 @@ func (m *tiproxyMemberManager) getNewStatefulSet(tc *v1alpha1.TidbCluster, cm *c
},
})

if !tc.Spec.TiProxy.SSLDisableTiDB || !tc.SkipTLSWhenConnectTiDB() {
if tc.Spec.TiProxy.SSLEnableTiDB || !tc.SkipTLSWhenConnectTiDB() {
volMounts = append(volMounts, corev1.VolumeMount{
Name: "tidb-client-tls", ReadOnly: true, MountPath: tiproxySQLPath,
})
Expand Down

0 comments on commit 647461d

Please sign in to comment.