Skip to content

Commit

Permalink
use should create client certificate when tlsClient set true
Browse files Browse the repository at this point in the history
  • Loading branch information
weekface committed Mar 16, 2020
1 parent 05e82bb commit d07f9cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion charts/tidb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,10 @@ tidb:
# 2. Create a K8s Secret object which contains the TiDB server-side certificate created above.
# The name of this Secret must be: <clusterName>-tidb-server-secret.
# kubectl create secret generic <clusterName>-tidb-server-secret --namespace=<namespace> --from-file=tls.crt=<path/to/tls.crt> --from-file=tls.key=<path/to/tls.key> --from-file=ca.crt=<path/to/ca.crt>
# 3. Then create the TiDB cluster with `tlsClient.enabled` set to `true`.
# 3. Create a K8s Secret object which contains the TiDB client-side certificate created above which will be used by TiDB Operator.
# The name of this Secret must be: <clusterName>-tidb-client-secret.
# kubectl create secret generic <clusterName>-tidb-client-secret --namespace=<namespace> --from-file=tls.crt=<path/to/tls.crt> --from-file=tls.key=<path/to/tls.key> --from-file=ca.crt=<path/to/ca.crt>
# 4. Then create the TiDB cluster with `tlsClient.enabled` set to `true`.
enabled: false

# mysqlClient is used to set password for TiDB
Expand Down
5 changes: 4 additions & 1 deletion pkg/apis/pingcap/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,10 @@ type TiDBTLSClient struct {
// 2. Create a K8s Secret object which contains the TiDB server-side certificate created above.
// The name of this Secret must be: <clusterName>-tidb-server-secret.
// kubectl create secret generic <clusterName>-tidb-server-secret --namespace=<namespace> --from-file=tls.crt=<path/to/tls.crt> --from-file=tls.key=<path/to/tls.key> --from-file=ca.crt=<path/to/ca.crt>
// 3. Set Enabled to `true`.
// 3. Create a K8s Secret object which contains the TiDB client-side certificate created above which will be used by TiDB Operator.
// The name of this Secret must be: <clusterName>-tidb-client-secret.
// kubectl create secret generic <clusterName>-tidb-client-secret --namespace=<namespace> --from-file=tls.crt=<path/to/tls.crt> --from-file=tls.key=<path/to/tls.key> --from-file=ca.crt=<path/to/ca.crt>
// 4. Set Enabled to `true`.
// +optional
Enabled bool `json:"enabled,omitempty"`
}
Expand Down

0 comments on commit d07f9cd

Please sign in to comment.