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
1004f5b0
Commit
1004f5b0
authored
Dec 16, 2019
by
Darren Shepherd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update vendor for kine fix
parent
96afc5fd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
4 deletions
+33
-4
go.mod
go.mod
+1
-1
go.sum
go.sum
+2
-2
client.go
vendor/github.com/rancher/kine/pkg/client/client.go
+21
-0
sql.go
...r/github.com/rancher/kine/pkg/logstructured/sqllog/sql.go
+8
-0
modules.txt
vendor/modules.txt
+1
-1
No files found.
go.mod
View file @
1004f5b0
...
...
@@ -99,7 +99,7 @@ require (
github.com/rakelkar/gonetsh v0.0.0-20190719023240-501daadcadf8 // indirect
github.com/rancher/dynamiclistener v0.2.0
github.com/rancher/helm-controller v0.3.0
github.com/rancher/kine v0.3.
1
github.com/rancher/kine v0.3.
2
github.com/rancher/remotedialer v0.2.0
github.com/rancher/wrangler v0.4.0
github.com/rancher/wrangler-api v0.4.0
...
...
go.sum
View file @
1004f5b0
...
...
@@ -743,8 +743,8 @@ github.com/rancher/flannel v0.11.0-k3s.1 h1:mIwnfWDafjzQgFkZeJ1AkFrrAT3EdBaA1giE
github.com/rancher/flannel v0.11.0-k3s.1/go.mod h1:Hn4ZV+eq0LhLZP63xZnxdGwXEoRSxs5sxELxu27M3UA=
github.com/rancher/helm-controller v0.3.0 h1:sYRpOiJc4+NmSEkft3lR2pwaEPOrPzZOTo2UjFnVF4I=
github.com/rancher/helm-controller v0.3.0/go.mod h1:194LHuZRrxcD82bG1rJtOWsw98U4JbPhDWqvL7l3PAw=
github.com/rancher/kine v0.3.
1 h1:gwfKz/KoyZG7Dyo/eKYb3eAKne6eSmQKE0etHTrGLLk
=
github.com/rancher/kine v0.3.
1
/go.mod h1:xEMl0tLCva9/9me7mXJ3m9Vo6yqHgC4OU3NiK4CPrGQ=
github.com/rancher/kine v0.3.
2 h1:2kP48ojBWVoZ6vlzixc9jc9uKRk7Yn1a7kWoOsJi7Sg
=
github.com/rancher/kine v0.3.
2
/go.mod h1:xEMl0tLCva9/9me7mXJ3m9Vo6yqHgC4OU3NiK4CPrGQ=
github.com/rancher/kubernetes v1.17.0-k3s.1 h1:g1xvTHOHMJxwWtseblor0gighLRHpL7Bf9MwX8HR3W0=
github.com/rancher/kubernetes v1.17.0-k3s.1/go.mod h1:NbNV+69yL3eKiKDJ+ZEjqOplN3BFXKBeunzkoOy8WLo=
github.com/rancher/kubernetes/staging/src/k8s.io/api v1.17.0-k3s.1 h1:L2mS7D+Kv/0ZUg9uJZcPfKuDCYcKOTprTQsK35i2hFg=
...
...
vendor/github.com/rancher/kine/pkg/client/client.go
View file @
1004f5b0
...
...
@@ -11,6 +11,7 @@ import (
)
type
Value
struct
{
Key
[]
byte
Data
[]
byte
Modified
int64
}
...
...
@@ -20,6 +21,7 @@ var (
)
type
Client
interface
{
List
(
ctx
context
.
Context
,
key
string
,
rev
int
)
([]
Value
,
error
)
Get
(
ctx
context
.
Context
,
key
string
)
(
Value
,
error
)
Put
(
ctx
context
.
Context
,
key
string
,
value
[]
byte
)
error
Create
(
ctx
context
.
Context
,
key
string
,
value
[]
byte
)
error
...
...
@@ -51,6 +53,24 @@ func New(config endpoint.ETCDConfig) (Client, error) {
},
nil
}
func
(
c
*
client
)
List
(
ctx
context
.
Context
,
key
string
,
rev
int
)
([]
Value
,
error
)
{
resp
,
err
:=
c
.
c
.
Get
(
ctx
,
key
,
clientv3
.
WithPrefix
(),
clientv3
.
WithRev
(
int64
(
rev
)))
if
err
!=
nil
{
return
nil
,
err
}
var
vals
[]
Value
for
_
,
kv
:=
range
resp
.
Kvs
{
vals
=
append
(
vals
,
Value
{
Key
:
kv
.
Key
,
Data
:
kv
.
Value
,
Modified
:
kv
.
ModRevision
,
})
}
return
vals
,
nil
}
func
(
c
*
client
)
Get
(
ctx
context
.
Context
,
key
string
)
(
Value
,
error
)
{
resp
,
err
:=
c
.
c
.
Get
(
ctx
,
key
)
if
err
!=
nil
{
...
...
@@ -59,6 +79,7 @@ func (c *client) Get(ctx context.Context, key string) (Value, error) {
if
len
(
resp
.
Kvs
)
==
1
{
return
Value
{
Key
:
resp
.
Kvs
[
0
]
.
Key
,
Data
:
resp
.
Kvs
[
0
]
.
Value
,
Modified
:
resp
.
Kvs
[
0
]
.
ModRevision
,
},
nil
...
...
vendor/github.com/rancher/kine/pkg/logstructured/sqllog/sql.go
View file @
1004f5b0
...
...
@@ -172,8 +172,16 @@ func (s *SQLLog) List(ctx context.Context, prefix, startKey string, limit, revis
err
error
)
// It's assumed that when there is a start key that that key exists.
if
strings
.
HasSuffix
(
prefix
,
"/"
)
{
// In the situation of a list start the startKey will not exist so set to ""
if
prefix
==
startKey
{
startKey
=
""
}
prefix
+=
"%"
}
else
{
// Also if this isn't a list there is no reason to pass startKey
startKey
=
""
}
if
revision
==
0
{
...
...
vendor/modules.txt
View file @
1004f5b0
...
...
@@ -725,7 +725,7 @@ github.com/rancher/helm-controller/pkg/generated/informers/externalversions/helm
github.com/rancher/helm-controller/pkg/generated/informers/externalversions/internalinterfaces
github.com/rancher/helm-controller/pkg/generated/listers/helm.cattle.io/v1
github.com/rancher/helm-controller/pkg/helm
# github.com/rancher/kine v0.3.
1
# github.com/rancher/kine v0.3.
2
github.com/rancher/kine/pkg/broadcaster
github.com/rancher/kine/pkg/client
github.com/rancher/kine/pkg/drivers/dqlite
...
...
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