We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e4447a commit 273cc63Copy full SHA for 273cc63
internal/datastore/embedmd/mysql/connect.go
@@ -5,8 +5,8 @@ import (
5
"time"
6
7
"github.com/go-sql-driver/mysql"
8
- _tls "github.com/kubeflow/model-registry/internal/tls"
9
"github.com/golang/glog"
+ _tls "github.com/kubeflow/model-registry/internal/tls"
10
gorm_mysql "gorm.io/driver/mysql"
11
"gorm.io/gorm"
12
"gorm.io/gorm/logger"
@@ -42,7 +42,14 @@ func (c *MySQLDBConnector) Connect() (*gorm.DB, error) {
42
return nil, err
43
}
44
45
- c.DSN += "&tls=custom"
+ cfg, err := mysql.ParseDSN(c.DSN)
46
+ if err != nil {
47
+ return nil, fmt.Errorf("failed to parse DSN: %w", err)
48
+ }
49
+
50
+ cfg.TLSConfig = "custom"
51
52
+ c.DSN = cfg.FormatDSN()
53
54
55
for i := range mysqlMaxRetries {
0 commit comments