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
aa037343
Commit
aa037343
authored
Oct 05, 2018
by
Darren Shepherd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ProcMountType
parent
911bf0c7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
22 deletions
+9
-22
util.go
pkg/api/pod/util.go
+8
-10
util.go
pkg/api/podsecuritypolicy/util.go
+1
-5
kube_features.go
pkg/features/kube_features.go
+0
-7
No files found.
pkg/api/pod/util.go
View file @
aa037343
...
...
@@ -289,17 +289,15 @@ func DropDisabledRunAsGroupField(podSpec *api.PodSpec) {
// DropDisabledProcMountField removes disabled fields from PodSpec related
// to ProcMount
func
DropDisabledProcMountField
(
podSpec
*
api
.
PodSpec
)
{
if
!
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
ProcMountType
)
{
defProcMount
:=
api
.
DefaultProcMount
for
i
:=
range
podSpec
.
Containers
{
if
podSpec
.
Containers
[
i
]
.
SecurityContext
!=
nil
{
podSpec
.
Containers
[
i
]
.
SecurityContext
.
ProcMount
=
&
defProcMount
}
defProcMount
:=
api
.
DefaultProcMount
for
i
:=
range
podSpec
.
Containers
{
if
podSpec
.
Containers
[
i
]
.
SecurityContext
!=
nil
{
podSpec
.
Containers
[
i
]
.
SecurityContext
.
ProcMount
=
&
defProcMount
}
for
i
:=
range
podSpec
.
InitContainers
{
if
podSpec
.
InitContainers
[
i
]
.
SecurityContext
!=
nil
{
podSpec
.
InitContainers
[
i
]
.
SecurityContext
.
ProcMount
=
&
defProcMount
}
}
for
i
:=
range
podSpec
.
InitContainers
{
if
podSpec
.
InitContainers
[
i
]
.
SecurityContext
!=
nil
{
podSpec
.
InitContainers
[
i
]
.
SecurityContext
.
ProcMount
=
&
defProcMount
}
}
}
...
...
pkg/api/podsecuritypolicy/util.go
View file @
aa037343
...
...
@@ -17,15 +17,11 @@ limitations under the License.
package
podsecuritypolicy
import
(
utilfeature
"k8s.io/apiserver/pkg/util/feature"
"k8s.io/kubernetes/pkg/apis/policy"
"k8s.io/kubernetes/pkg/features"
)
// DropDisabledAlphaFields removes disabled fields from the pod security policy spec.
// This should be called from PrepareForCreate/PrepareForUpdate for all resources containing a od security policy spec.
func
DropDisabledAlphaFields
(
pspSpec
*
policy
.
PodSecurityPolicySpec
)
{
if
!
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
ProcMountType
)
{
pspSpec
.
AllowedProcMountTypes
=
nil
}
pspSpec
.
AllowedProcMountTypes
=
nil
}
pkg/features/kube_features.go
View file @
aa037343
...
...
@@ -213,12 +213,6 @@ const (
// Enable resource quota scope selectors
ResourceQuotaScopeSelectors
utilfeature
.
Feature
=
"ResourceQuotaScopeSelectors"
// owner: @jessfraz
// alpha: v1.12
//
// Enables control over ProcMountType for containers.
ProcMountType
utilfeature
.
Feature
=
"ProcMountType"
// owner: @janetkuo
// alpha: v1.12
//
...
...
@@ -264,7 +258,6 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
PodReadinessGates
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
KubeletPluginsWatcher
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
ResourceQuotaScopeSelectors
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
ProcMountType
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
TTLAfterFinished
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
// inherited features from generic apiserver, relisted here to get a conflict if it is changed
...
...
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