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
a8a6de28
Commit
a8a6de28
authored
Oct 05, 2018
by
Darren Shepherd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ExpandInUsePersistentVolumes
parent
d808606d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
45 deletions
+1
-45
kube_features.go
pkg/features/kube_features.go
+0
-6
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 @
a8a6de28
...
...
@@ -95,11 +95,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: @gnufied
// alpha: v1.14
// Ability to expand CSI volumes
...
...
@@ -436,7 +431,6 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
PodPriority
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
TaintNodesByCondition
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
ExpandPersistentVolumes
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
ExpandInUsePersistentVolumes
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
ExpandCSIVolumes
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
AttachVolumeLimit
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
CPUManager
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
...
...
pkg/kubelet/volumemanager/cache/actual_state_of_world.go
View file @
a8a6de28
...
...
@@ -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"
...
...
@@ -640,10 +638,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 @
a8a6de28
...
...
@@ -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 @
a8a6de28
...
...
@@ -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