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
f2eeb087
Commit
f2eeb087
authored
Jun 01, 2018
by
vikaschoudhary16
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature gate for kubelet plugin watcher
parent
0ea07c40
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
kube_features.go
pkg/features/kube_features.go
+8
-0
kubelet.go
pkg/kubelet/kubelet.go
+9
-4
No files found.
pkg/features/kube_features.go
View file @
f2eeb087
...
@@ -304,6 +304,13 @@ const (
...
@@ -304,6 +304,13 @@ const (
// Allow subpath environment variable substitution
// Allow subpath environment variable substitution
// Only applicable if the VolumeSubpath feature is also enabled
// Only applicable if the VolumeSubpath feature is also enabled
VolumeSubpathEnvExpansion
utilfeature
.
Feature
=
"VolumeSubpathEnvExpansion"
VolumeSubpathEnvExpansion
utilfeature
.
Feature
=
"VolumeSubpathEnvExpansion"
// owner: @vikaschoudhary16
// alpha: v1.11
//
//
// Enable probe based plugin watcher utility for discovering Kubelet plugins
KubeletPluginsWatcher
utilfeature
.
Feature
=
"KubeletPluginsWatcher"
)
)
func
init
()
{
func
init
()
{
...
@@ -356,6 +363,7 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
...
@@ -356,6 +363,7 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
BalanceAttachedNodeVolumes
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
BalanceAttachedNodeVolumes
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
DynamicProvisioningScheduling
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
DynamicProvisioningScheduling
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
VolumeSubpathEnvExpansion
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
VolumeSubpathEnvExpansion
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
KubeletPluginsWatcher
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
// inherited features from generic apiserver, relisted here to get a conflict if it is changed
// inherited features from generic apiserver, relisted here to get a conflict if it is changed
// unintentionally on either side:
// unintentionally on either side:
...
...
pkg/kubelet/kubelet.go
View file @
f2eeb087
...
@@ -540,6 +540,7 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration,
...
@@ -540,6 +540,7 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration,
experimentalHostUserNamespaceDefaulting
:
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
ExperimentalHostUserNamespaceDefaultingGate
),
experimentalHostUserNamespaceDefaulting
:
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
ExperimentalHostUserNamespaceDefaultingGate
),
keepTerminatedPodVolumes
:
keepTerminatedPodVolumes
,
keepTerminatedPodVolumes
:
keepTerminatedPodVolumes
,
nodeStatusMaxImages
:
nodeStatusMaxImages
,
nodeStatusMaxImages
:
nodeStatusMaxImages
,
enablePluginsWatcher
:
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
KubeletPluginsWatcher
),
}
}
if
klet
.
cloud
!=
nil
{
if
klet
.
cloud
!=
nil
{
...
@@ -1172,6 +1173,9 @@ type Kubelet struct {
...
@@ -1172,6 +1173,9 @@ type Kubelet struct {
// This flag sets a maximum number of images to report in the node status.
// This flag sets a maximum number of images to report in the node status.
nodeStatusMaxImages
int32
nodeStatusMaxImages
int32
// This flag indicates that kubelet should start plugin watcher utility server for discovering Kubelet plugins
enablePluginsWatcher
bool
}
}
func
allGlobalUnicastIPs
()
([]
net
.
IP
,
error
)
{
func
allGlobalUnicastIPs
()
([]
net
.
IP
,
error
)
{
...
@@ -1285,10 +1289,11 @@ func (kl *Kubelet) initializeModules() error {
...
@@ -1285,10 +1289,11 @@ func (kl *Kubelet) initializeModules() error {
glog
.
Errorf
(
"Failed to create directory %q: %v"
,
ContainerLogsDir
,
err
)
glog
.
Errorf
(
"Failed to create directory %q: %v"
,
ContainerLogsDir
,
err
)
}
}
}
}
if
kl
.
enablePluginsWatcher
{
// Start the plugin watcher
// Start the plugin watcher
if
err
:=
kl
.
pluginWatcher
.
Start
();
err
!=
nil
{
if
err
:=
kl
.
pluginWatcher
.
Start
();
err
!=
nil
{
return
fmt
.
Errorf
(
"failed to start Plugin Watcher. err: %v"
,
err
)
return
fmt
.
Errorf
(
"failed to start Plugin Watcher. err: %v"
,
err
)
}
}
}
// Start the image manager.
// Start the image manager.
...
...
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