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

tiproxy: revert enable SSL by default #5084

Merged
merged 1 commit into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading