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
4a5360ea
Unverified
Commit
4a5360ea
authored
Aug 31, 2019
by
Darren Shepherd
Committed by
GitHub
Aug 31, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #782 from ibuildthecloud/master
Fix CSI and update vendor
parents
8a9c8675
209acb58
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
49 deletions
+17
-49
server.go
pkg/cli/server/server.go
+0
-4
base.go
vendor/k8s.io/client-go/pkg/version/base.go
+2
-2
base.go
vendor/k8s.io/kubernetes/pkg/version/base.go
+2
-2
csi_plugin.go
vendor/k8s.io/kubernetes/pkg/volume/csi/csi_plugin.go
+9
-34
plugins.go
vendor/k8s.io/kubernetes/pkg/volume/plugins.go
+4
-7
No files found.
pkg/cli/server/server.go
View file @
4a5360ea
...
...
@@ -21,7 +21,6 @@ import (
"github.com/urfave/cli"
"k8s.io/apimachinery/pkg/util/net"
"k8s.io/kubernetes/pkg/master"
"k8s.io/kubernetes/pkg/volume/csi"
_
"github.com/go-sql-driver/mysql"
// ensure we have mysql
_
"github.com/lib/pq"
// ensure we have postgres
...
...
@@ -55,9 +54,6 @@ func run(app *cli.Context, cfg *cmds.Server) error {
}
}
// If running agent in server, set this so that CSI initializes properly
csi
.
WaitForValidHostName
=
!
cfg
.
DisableAgent
serverConfig
:=
server
.
Config
{}
serverConfig
.
ControlConfig
.
ClusterSecret
=
cfg
.
ClusterSecret
serverConfig
.
ControlConfig
.
DataDir
=
cfg
.
DataDir
...
...
vendor/k8s.io/client-go/pkg/version/base.go
View file @
4a5360ea
...
...
@@ -4,7 +4,7 @@ var (
gitMajor
=
"1"
gitMinor
=
"15"
gitVersion
=
"v1.15.3-k3s.1"
gitCommit
=
"
2258cf7b7c767ecca887c5fc17784b3f8472b271
"
gitCommit
=
"
77c93d8d16059eb6873a8a154bbd70518b4e9db4
"
gitTreeState
=
"clean"
buildDate
=
"2019-08-
29T05:27
+00:00Z"
buildDate
=
"2019-08-
30T18:26
+00:00Z"
)
vendor/k8s.io/kubernetes/pkg/version/base.go
View file @
4a5360ea
...
...
@@ -4,7 +4,7 @@ var (
gitMajor
=
"1"
gitMinor
=
"15"
gitVersion
=
"v1.15.3-k3s.1"
gitCommit
=
"
2258cf7b7c767ecca887c5fc17784b3f8472b271
"
gitCommit
=
"
77c93d8d16059eb6873a8a154bbd70518b4e9db4
"
gitTreeState
=
"clean"
buildDate
=
"2019-08-
29T05:27
+00:00Z"
buildDate
=
"2019-08-
30T18:26
+00:00Z"
)
vendor/k8s.io/kubernetes/pkg/volume/csi/csi_plugin.go
View file @
4a5360ea
...
...
@@ -23,7 +23,6 @@ import (
"path"
"sort"
"strings"
"sync"
"time"
"context"
...
...
@@ -64,12 +63,6 @@ const (
csiResyncPeriod
=
time
.
Minute
)
var
(
WaitForValidHostName
bool
csiPluginInstance
*
csiPlugin
csiPluginLock
sync
.
Mutex
)
var
deprecatedSocketDirVersions
=
[]
string
{
"0.1.0"
,
"0.2.0"
,
"0.3.0"
,
"0.4.0"
}
type
csiPlugin
struct
{
...
...
@@ -86,18 +79,11 @@ const ephemeralDriverMode driverMode = "ephemeral"
// ProbeVolumePlugins returns implemented plugins
func
ProbeVolumePlugins
()
[]
volume
.
VolumePlugin
{
csiPluginLock
.
Lock
()
defer
csiPluginLock
.
Unlock
()
if
csiPluginInstance
!=
nil
{
return
[]
volume
.
VolumePlugin
{
csiPluginInstance
}
}
csiPluginInstance
=
&
csiPlugin
{
p
:=
&
csiPlugin
{
host
:
nil
,
blockEnabled
:
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
CSIBlockVolume
),
}
return
[]
volume
.
VolumePlugin
{
csiPluginInstance
}
return
[]
volume
.
VolumePlugin
{
p
}
}
// volume.VolumePlugin methods
...
...
@@ -221,21 +207,6 @@ func (h *RegistrationHandler) DeRegisterPlugin(pluginName string) {
}
func
(
p
*
csiPlugin
)
Init
(
host
volume
.
VolumeHost
)
error
{
csiPluginLock
.
Lock
()
defer
csiPluginLock
.
Unlock
()
if
WaitForValidHostName
&&
host
.
GetHostName
()
==
""
{
for
{
if
p
.
host
!=
nil
{
return
nil
}
csiPluginLock
.
Unlock
()
time
.
Sleep
(
time
.
Second
)
klog
.
Infof
(
"Waiting for CSI volume hostname"
)
csiPluginLock
.
Lock
()
}
}
p
.
host
=
host
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
CSIDriverRegistry
)
{
...
...
@@ -274,21 +245,25 @@ func (p *csiPlugin) Init(host volume.VolumeHost) error {
}
// Initializing the label management channels
nim
=
nodeinfomanager
.
NewNodeInfoManager
(
host
.
GetNodeName
(),
host
,
migratedPlugins
)
localNim
:
=
nodeinfomanager
.
NewNodeInfoManager
(
host
.
GetNodeName
(),
host
,
migratedPlugins
)
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
CSINodeInfo
)
&&
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
CSIMigration
)
{
// This function prevents Kubelet from posting Ready status until CSINodeInfo
// is both installed and initialized
if
err
:=
initializeCSINode
(
host
);
err
!=
nil
{
if
err
:=
initializeCSINode
(
host
,
localNim
);
err
!=
nil
{
return
fmt
.
Errorf
(
"failed to initialize CSINodeInfo: %v"
,
err
)
}
}
if
_
,
ok
:=
host
.
(
volume
.
KubeletVolumeHost
);
ok
{
nim
=
localNim
}
return
nil
}
func
initializeCSINode
(
host
volume
.
VolumeHost
)
error
{
func
initializeCSINode
(
host
volume
.
VolumeHost
,
nim
nodeinfomanager
.
Interface
)
error
{
kvh
,
ok
:=
host
.
(
volume
.
KubeletVolumeHost
)
if
!
ok
{
klog
.
V
(
4
)
.
Info
(
"Cast from VolumeHost to KubeletVolumeHost failed. Skipping CSINodeInfo initialization, not running on kubelet"
)
...
...
vendor/k8s.io/kubernetes/pkg/volume/plugins.go
View file @
4a5360ea
...
...
@@ -18,6 +18,10 @@ package volume
import
(
"fmt"
"net"
"strings"
"sync"
authenticationv1
"k8s.io/api/authentication/v1"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
...
...
@@ -37,9 +41,6 @@ import (
"k8s.io/kubernetes/pkg/util/mount"
"k8s.io/kubernetes/pkg/volume/util/recyclerclient"
"k8s.io/kubernetes/pkg/volume/util/subpath"
"net"
"strings"
"sync"
)
type
ProbeOperation
uint32
...
...
@@ -576,10 +577,6 @@ func (pm *VolumePluginMgr) InitPlugins(plugins []VolumePlugin, prober DynamicPlu
pm
.
mutex
.
Lock
()
defer
pm
.
mutex
.
Unlock
()
if
pm
.
Host
!=
nil
{
return
nil
}
pm
.
Host
=
host
if
prober
==
nil
{
...
...
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