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
5eb2ec73
Commit
5eb2ec73
authored
Oct 05, 2018
by
Darren Shepherd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ProcMountType
parent
423354b7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
20 deletions
+9
-20
util.go
pkg/api/pod/util.go
+8
-10
util.go
pkg/api/podsecuritypolicy/util.go
+1
-3
kube_features.go
pkg/features/kube_features.go
+0
-7
No files found.
pkg/api/pod/util.go
View file @
5eb2ec73
...
@@ -282,17 +282,15 @@ func DropDisabledRunAsGroupField(podSpec *api.PodSpec) {
...
@@ -282,17 +282,15 @@ func DropDisabledRunAsGroupField(podSpec *api.PodSpec) {
// DropDisabledProcMountField removes disabled fields from PodSpec related
// DropDisabledProcMountField removes disabled fields from PodSpec related
// to ProcMount
// to ProcMount
func
DropDisabledProcMountField
(
podSpec
*
api
.
PodSpec
)
{
func
DropDisabledProcMountField
(
podSpec
*
api
.
PodSpec
)
{
if
!
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
ProcMountType
)
{
defProcMount
:=
api
.
DefaultProcMount
defProcMount
:=
api
.
DefaultProcMount
for
i
:=
range
podSpec
.
Containers
{
for
i
:=
range
podSpec
.
Containers
{
if
podSpec
.
Containers
[
i
]
.
SecurityContext
!=
nil
{
if
podSpec
.
Containers
[
i
]
.
SecurityContext
!=
nil
{
podSpec
.
Containers
[
i
]
.
SecurityContext
.
ProcMount
=
&
defProcMount
podSpec
.
Containers
[
i
]
.
SecurityContext
.
ProcMount
=
&
defProcMount
}
}
}
for
i
:=
range
podSpec
.
InitContainers
{
}
if
podSpec
.
InitContainers
[
i
]
.
SecurityContext
!=
nil
{
for
i
:=
range
podSpec
.
InitContainers
{
podSpec
.
InitContainers
[
i
]
.
SecurityContext
.
ProcMount
=
&
defProcMount
if
podSpec
.
InitContainers
[
i
]
.
SecurityContext
!=
nil
{
}
podSpec
.
InitContainers
[
i
]
.
SecurityContext
.
ProcMount
=
&
defProcMount
}
}
}
}
}
}
...
...
pkg/api/podsecuritypolicy/util.go
View file @
5eb2ec73
...
@@ -25,9 +25,7 @@ import (
...
@@ -25,9 +25,7 @@ import (
// DropDisabledAlphaFields removes disabled fields from the pod security policy spec.
// 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.
// This should be called from PrepareForCreate/PrepareForUpdate for all resources containing a od security policy spec.
func
DropDisabledAlphaFields
(
pspSpec
*
policy
.
PodSecurityPolicySpec
)
{
func
DropDisabledAlphaFields
(
pspSpec
*
policy
.
PodSecurityPolicySpec
)
{
if
!
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
ProcMountType
)
{
pspSpec
.
AllowedProcMountTypes
=
nil
pspSpec
.
AllowedProcMountTypes
=
nil
}
if
!
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
RunAsGroup
)
{
if
!
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
RunAsGroup
)
{
pspSpec
.
RunAsGroup
=
nil
pspSpec
.
RunAsGroup
=
nil
}
}
...
...
pkg/features/kube_features.go
View file @
5eb2ec73
...
@@ -251,12 +251,6 @@ const (
...
@@ -251,12 +251,6 @@ const (
// Enable resource quota scope selectors
// Enable resource quota scope selectors
ResourceQuotaScopeSelectors
utilfeature
.
Feature
=
"ResourceQuotaScopeSelectors"
ResourceQuotaScopeSelectors
utilfeature
.
Feature
=
"ResourceQuotaScopeSelectors"
// owner: @jessfraz
// alpha: v1.12
//
// Enables control over ProcMountType for containers.
ProcMountType
utilfeature
.
Feature
=
"ProcMountType"
// owner: @janetkuo
// owner: @janetkuo
// alpha: v1.12
// alpha: v1.12
//
//
...
@@ -313,7 +307,6 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
...
@@ -313,7 +307,6 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
PodReadinessGates
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
PodReadinessGates
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
KubeletPluginsWatcher
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
KubeletPluginsWatcher
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
ResourceQuotaScopeSelectors
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
ResourceQuotaScopeSelectors
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
ProcMountType
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
TTLAfterFinished
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
TTLAfterFinished
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
KubeletPodResources
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
KubeletPodResources
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
...
...
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