Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
e82b62cb
Commit
e82b62cb
authored
Jun 12, 2019
by
galal-hussein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vendor update
parent
9efbeb11
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
4 deletions
+34
-4
vendor.conf
vendor.conf
+1
-1
mysql.go
...b.com/ibuildthecloud/kvsql/clientv3/driver/mysql/mysql.go
+13
-1
pgsql.go
...b.com/ibuildthecloud/kvsql/clientv3/driver/pgsql/pgsql.go
+2
-0
kv.go
vendor/github.com/ibuildthecloud/kvsql/clientv3/kv.go
+1
-1
factory.go
vendor/github.com/ibuildthecloud/kvsql/factory.go
+17
-1
No files found.
vendor.conf
View file @
e82b62cb
...
@@ -123,7 +123,7 @@ golang.org/x/time f51c12702a4d776e4c1fa9b0fabab841babae631
...
@@ -123,7 +123,7 @@ golang.org/x/time f51c12702a4d776e4c1fa9b0fabab841babae631
gopkg
.
in
/
inf
.
v0
3887
ee99ecf07df5b447e9b00d9c0b2adaa9f3e4
gopkg
.
in
/
inf
.
v0
3887
ee99ecf07df5b447e9b00d9c0b2adaa9f3e4
gopkg
.
in
/
yaml
.
v2
v2
.
2
.
1
gopkg
.
in
/
yaml
.
v2
v2
.
2
.
1
#github.com/ibuildthecloud/kvsql 788464096f5af361d166858efccf26c12dc5b427
#github.com/ibuildthecloud/kvsql 788464096f5af361d166858efccf26c12dc5b427
github
.
com
/
ibuildthecloud
/
kvsql
d37dd2b0829b44a4964e48c9396e14b0536fefb6
https
://
github
.
com
/
erikwilson
/
rancher
-
kvsql
.
git
github
.
com
/
ibuildthecloud
/
kvsql
1
afc2d8ad7d7e263c1971b05cb37e83aa5562561
https
://
github
.
com
/
erikwilson
/
rancher
-
kvsql
.
git
# rootless
# rootless
github
.
com
/
rootless
-
containers
/
rootlesskit
893
c1c3de71f54c301fdb85a7c0dd15c1933c159
github
.
com
/
rootless
-
containers
/
rootlesskit
893
c1c3de71f54c301fdb85a7c0dd15c1933c159
...
...
vendor/github.com/ibuildthecloud/kvsql/clientv3/driver/mysql/mysql.go
View file @
e82b62cb
package
mysql
package
mysql
import
(
import
(
"crypto/tls"
"database/sql"
"database/sql"
"strings"
"strings"
...
@@ -64,7 +65,7 @@ func NewMySQL() *driver.Generic {
...
@@ -64,7 +65,7 @@ func NewMySQL() *driver.Generic {
}
}
}
}
func
Open
(
dataSourceName
string
)
(
*
sql
.
DB
,
error
)
{
func
Open
(
dataSourceName
string
,
tlsConfig
*
tls
.
Config
)
(
*
sql
.
DB
,
error
)
{
if
dataSourceName
==
""
{
if
dataSourceName
==
""
{
dataSourceName
=
"root@unix(/var/run/mysqld/mysqld.sock)/"
dataSourceName
=
"root@unix(/var/run/mysqld/mysqld.sock)/"
}
}
...
@@ -77,6 +78,17 @@ func Open(dataSourceName string) (*sql.DB, error) {
...
@@ -77,6 +78,17 @@ func Open(dataSourceName string) (*sql.DB, error) {
}
}
dataSourceName
=
dataSourceName
+
"kubernetes"
dataSourceName
=
dataSourceName
+
"kubernetes"
}
}
// setting up tlsConfig
if
tlsConfig
!=
nil
{
mysql
.
RegisterTLSConfig
(
"custom"
,
tlsConfig
)
if
strings
.
Contains
(
dataSourceName
,
"?"
)
{
dataSourceName
=
dataSourceName
+
",tls=custom"
}
else
{
dataSourceName
=
dataSourceName
+
"?tls=custom"
}
}
db
,
err
:=
sql
.
Open
(
"mysql"
,
dataSourceName
)
db
,
err
:=
sql
.
Open
(
"mysql"
,
dataSourceName
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
...
vendor/github.com/ibuildthecloud/kvsql/clientv3/driver/pgsql/pgsql.go
View file @
e82b62cb
...
@@ -68,6 +68,8 @@ func NewPGSQL() *driver.Generic {
...
@@ -68,6 +68,8 @@ func NewPGSQL() *driver.Generic {
func
Open
(
dataSourceName
string
)
(
*
sql
.
DB
,
error
)
{
func
Open
(
dataSourceName
string
)
(
*
sql
.
DB
,
error
)
{
if
dataSourceName
==
""
{
if
dataSourceName
==
""
{
dataSourceName
=
"postgres://postgres:postgres@localhost/"
dataSourceName
=
"postgres://postgres:postgres@localhost/"
}
else
{
dataSourceName
=
"postgres://"
+
dataSourceName
}
}
// get database name
// get database name
dsList
:=
strings
.
Split
(
dataSourceName
,
"/"
)
dsList
:=
strings
.
Split
(
dataSourceName
,
"/"
)
...
...
vendor/github.com/ibuildthecloud/kvsql/clientv3/kv.go
View file @
e82b62cb
...
@@ -115,7 +115,7 @@ func newKV(cfg Config) (*kv, error) {
...
@@ -115,7 +115,7 @@ func newKV(cfg Config) (*kv, error) {
}
}
driver
=
sqlite
.
NewSQLite
()
driver
=
sqlite
.
NewSQLite
()
case
"mysql"
:
case
"mysql"
:
if
db
,
err
=
mysql
.
Open
(
parts
[
1
]);
err
!=
nil
{
if
db
,
err
=
mysql
.
Open
(
parts
[
1
]
,
cfg
.
TLS
);
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
driver
=
mysql
.
NewMySQL
()
driver
=
mysql
.
NewMySQL
()
...
...
vendor/github.com/ibuildthecloud/kvsql/factory.go
View file @
e82b62cb
...
@@ -18,12 +18,14 @@ package factory
...
@@ -18,12 +18,14 @@ package factory
import
(
import
(
"context"
"context"
"crypto/tls"
"fmt"
"fmt"
"sync/atomic"
"sync/atomic"
"time"
"time"
"github.com/coreos/etcd/pkg/transport"
"github.com/ibuildthecloud/kvsql/clientv3"
"github.com/ibuildthecloud/kvsql/clientv3"
"github.com/ibuildthecloud/kvsql/storage"
etcd3
"github.com/ibuildthecloud/kvsql/storage"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/apiserver/pkg/storage"
"k8s.io/apiserver/pkg/storage"
"k8s.io/apiserver/pkg/storage/storagebackend"
"k8s.io/apiserver/pkg/storage/storagebackend"
...
@@ -65,8 +67,22 @@ func NewKVSQLHealthCheck(c storagebackend.Config) (func() error, error) {
...
@@ -65,8 +67,22 @@ func NewKVSQLHealthCheck(c storagebackend.Config) (func() error, error) {
}
}
func
newETCD3Client
(
c
storagebackend
.
Config
)
(
*
clientv3
.
Client
,
error
)
{
func
newETCD3Client
(
c
storagebackend
.
Config
)
(
*
clientv3
.
Client
,
error
)
{
tlsInfo
:=
transport
.
TLSInfo
{
CertFile
:
c
.
Transport
.
CertFile
,
KeyFile
:
c
.
Transport
.
KeyFile
,
CAFile
:
c
.
Transport
.
CAFile
,
}
tlsConfig
,
err
:=
tlsInfo
.
ClientConfig
()
if
err
!=
nil
{
return
nil
,
err
}
tlsConfig
.
MinVersion
=
tls
.
VersionTLS11
if
len
(
c
.
Transport
.
CertFile
)
==
0
&&
len
(
c
.
Transport
.
KeyFile
)
==
0
&&
len
(
c
.
Transport
.
CAFile
)
==
0
{
tlsConfig
=
nil
}
cfg
:=
clientv3
.
Config
{
cfg
:=
clientv3
.
Config
{
Endpoints
:
c
.
Transport
.
ServerList
,
Endpoints
:
c
.
Transport
.
ServerList
,
TLS
:
tlsConfig
,
}
}
if
len
(
cfg
.
Endpoints
)
==
0
{
if
len
(
cfg
.
Endpoints
)
==
0
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment