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
b2755f4c
Commit
b2755f4c
authored
Oct 05, 2018
by
Darren Shepherd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ExpandInUsePersistentVolumes
parent
eb8c933f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
47 deletions
+3
-47
kube_features.go
pkg/features/kube_features.go
+2
-8
actual_state_of_world.go
pkg/kubelet/volumemanager/cache/actual_state_of_world.go
+0
-6
desired_state_of_world_populator.go
...lumemanager/populator/desired_state_of_world_populator.go
+1
-17
reconciler.go
pkg/kubelet/volumemanager/reconciler/reconciler.go
+0
-16
No files found.
pkg/features/kube_features.go
View file @
b2755f4c
...
...
@@ -92,11 +92,6 @@ const (
// Ability to Expand persistent volumes
ExpandPersistentVolumes
utilfeature
.
Feature
=
"ExpandPersistentVolumes"
// owner: @mlmhl
// alpha: v1.11
// Ability to expand persistent volumes' file system without unmounting volumes.
ExpandInUsePersistentVolumes
utilfeature
.
Feature
=
"ExpandInUsePersistentVolumes"
// owner: @verb
// beta: v1.12
//
...
...
@@ -368,8 +363,8 @@ func init() {
// To add a new feature, define a key for it above and add it here. The features will be
// available throughout Kubernetes binaries.
var
defaultKubernetesFeatureGates
=
map
[
utilfeature
.
Feature
]
utilfeature
.
FeatureSpec
{
AppArmor
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
DynamicKubeletConfig
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
AppArmor
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
DynamicKubeletConfig
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
ExperimentalHostUserNamespaceDefaultingGate
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Beta
},
DevicePlugins
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
TaintBasedEvictions
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
...
...
@@ -384,7 +379,6 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
TaintNodesByCondition
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
MountPropagation
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
ExpandPersistentVolumes
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
ExpandInUsePersistentVolumes
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
AttachVolumeLimit
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
CPUManager
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
CPUCFSQuotaPeriod
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
...
...
pkg/kubelet/volumemanager/cache/actual_state_of_world.go
View file @
b2755f4c
...
...
@@ -26,9 +26,7 @@ import (
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
utilfeature
"k8s.io/apiserver/pkg/util/feature"
"k8s.io/klog"
"k8s.io/kubernetes/pkg/features"
"k8s.io/kubernetes/pkg/volume"
"k8s.io/kubernetes/pkg/volume/util"
"k8s.io/kubernetes/pkg/volume/util/operationexecutor"
...
...
@@ -635,10 +633,6 @@ func (asw *actualStateOfWorld) PodExistsInVolume(
if
podObj
.
remountRequired
{
return
true
,
volumeObj
.
devicePath
,
newRemountRequiredError
(
volumeObj
.
volumeName
,
podObj
.
podName
)
}
if
podObj
.
fsResizeRequired
&&
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
ExpandInUsePersistentVolumes
)
{
return
true
,
volumeObj
.
devicePath
,
newFsResizeRequiredError
(
volumeObj
.
volumeName
,
podObj
.
podName
)
}
}
return
podExists
,
volumeObj
.
devicePath
,
nil
...
...
pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go
View file @
b2755f4c
...
...
@@ -183,17 +183,6 @@ func (dswp *desiredStateOfWorldPopulator) isPodTerminated(pod *v1.Pod) bool {
func
(
dswp
*
desiredStateOfWorldPopulator
)
findAndAddNewPods
()
{
// Map unique pod name to outer volume name to MountedVolume.
mountedVolumesForPod
:=
make
(
map
[
volumetypes
.
UniquePodName
]
map
[
string
]
cache
.
MountedVolume
)
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
ExpandInUsePersistentVolumes
)
{
for
_
,
mountedVolume
:=
range
dswp
.
actualStateOfWorld
.
GetMountedVolumes
()
{
mountedVolumes
,
exist
:=
mountedVolumesForPod
[
mountedVolume
.
PodName
]
if
!
exist
{
mountedVolumes
=
make
(
map
[
string
]
cache
.
MountedVolume
)
mountedVolumesForPod
[
mountedVolume
.
PodName
]
=
mountedVolumes
}
mountedVolumes
[
mountedVolume
.
OuterVolumeSpecName
]
=
mountedVolume
}
}
processedVolumesForFSResize
:=
sets
.
NewString
()
for
_
,
pod
:=
range
dswp
.
podManager
.
GetPods
()
{
if
dswp
.
isPodTerminated
(
pod
)
{
...
...
@@ -290,7 +279,7 @@ func (dswp *desiredStateOfWorldPopulator) processPodVolumes(
// Process volume spec for each volume defined in pod
for
_
,
podVolume
:=
range
pod
.
Spec
.
Volumes
{
pvc
,
volumeSpec
,
volumeGidValue
,
err
:=
_
,
volumeSpec
,
volumeGidValue
,
err
:=
dswp
.
createVolumeSpec
(
podVolume
,
pod
.
Name
,
pod
.
Namespace
,
mountsMap
,
devicesMap
)
if
err
!=
nil
{
klog
.
Errorf
(
...
...
@@ -320,11 +309,6 @@ func (dswp *desiredStateOfWorldPopulator) processPodVolumes(
podVolume
.
Name
,
volumeSpec
.
Name
(),
uniquePodName
)
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
ExpandInUsePersistentVolumes
)
{
dswp
.
checkVolumeFSResize
(
pod
,
podVolume
,
pvc
,
volumeSpec
,
uniquePodName
,
mountedVolumesForPod
,
processedVolumesForFSResize
)
}
}
// some of the volume additions may have failed, should not mark this pod as fully processed
...
...
pkg/kubelet/volumemanager/reconciler/reconciler.go
View file @
b2755f4c
...
...
@@ -254,22 +254,6 @@ func (rc *reconciler) reconcile() {
klog
.
V
(
5
)
.
Infof
(
volumeToMount
.
GenerateMsgDetailed
(
"operationExecutor.MountVolume started"
,
remountingLogStr
))
}
}
}
else
if
cache
.
IsFSResizeRequiredError
(
err
)
&&
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
ExpandInUsePersistentVolumes
)
{
klog
.
V
(
4
)
.
Infof
(
volumeToMount
.
GenerateMsgDetailed
(
"Starting operationExecutor.ExpandVolumeFSWithoutUnmounting"
,
""
))
err
:=
rc
.
operationExecutor
.
ExpandVolumeFSWithoutUnmounting
(
volumeToMount
.
VolumeToMount
,
rc
.
actualStateOfWorld
)
if
err
!=
nil
&&
!
nestedpendingoperations
.
IsAlreadyExists
(
err
)
&&
!
exponentialbackoff
.
IsExponentialBackoff
(
err
)
{
// Ignore nestedpendingoperations.IsAlreadyExists and exponentialbackoff.IsExponentialBackoff errors, they are expected.
// Log all other errors.
klog
.
Errorf
(
volumeToMount
.
GenerateErrorDetailed
(
"operationExecutor.ExpandVolumeFSWithoutUnmounting failed"
,
err
)
.
Error
())
}
if
err
==
nil
{
klog
.
V
(
4
)
.
Infof
(
volumeToMount
.
GenerateMsgDetailed
(
"operationExecutor.ExpandVolumeFSWithoutUnmounting started"
,
""
))
}
}
}
...
...
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