Skip to content

Commit

Permalink
Update connection string
Browse files Browse the repository at this point in the history
Signed-off-by: Neaj Morshad <[email protected]>
  • Loading branch information
Neaj-Morshad-101 committed Feb 8, 2024
1 parent b6e67a1 commit 6fdfd7a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mssql/kubedb_client_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ func (o *KubeDBClientBuilder) getConnectionString() (string, error) {
if o.podName != "" {
o.url = o.getURL()
}

tlsConfig := ""
//TODO: TLS
//tlsConfig := ""
//if o.db.Spec.RequireSSL && o.db.Spec.TLS != nil {
// // get client-secret
// var clientSecret core.Secret
Expand Down Expand Up @@ -178,6 +178,8 @@ func (o *KubeDBClientBuilder) getConnectionString() (string, error) {
// }
//}

connector := fmt.Sprintf("sqlserver://%s:%s@%s:%d?%s", user, pass, o.url, 1433, tlsConfig)
// sqlserver://username:password@host:port?param1=value&param2=value
// connector := fmt.Sprintf("sqlserver://%s:%s@%s:%d?%s", user, pass, o.url, 1433, tlsConfig)
connector := fmt.Sprintf("sqlserver://%s:%s@%s:%d?database=master", user, pass, o.url, 1433)
return connector, nil
}

0 comments on commit 6fdfd7a

Please sign in to comment.