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
8c95a07b
Unverified
Commit
8c95a07b
authored
Mar 01, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Mar 01, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #73007 from krmayankk/runasgroup
Promote RunAsGroup to Beta
parents
fa86a27d
1b125127
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
kube_features.go
pkg/features/kube_features.go
+2
-2
security_context.go
test/e2e/node/security_context.go
+13
-13
No files found.
pkg/features/kube_features.go
View file @
8c95a07b
...
...
@@ -278,7 +278,7 @@ const (
CRIContainerLogRotation
utilfeature
.
Feature
=
"CRIContainerLogRotation"
// owner: @krmayankk
//
alpha: v1.10
//
beta: v1.14
//
// Enables control over the primary group ID of containers' init processes.
RunAsGroup
utilfeature
.
Feature
=
"RunAsGroup"
...
...
@@ -465,7 +465,7 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
CSIMigration
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
CSIMigrationGCE
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
CSIMigrationAWS
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
RunAsGroup
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alph
a
},
RunAsGroup
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Bet
a
},
VolumeSubpath
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
BalanceAttachedNodeVolumes
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
PodReadinessGates
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
...
...
test/e2e/node/security_context.go
View file @
8c95a07b
...
...
@@ -60,10 +60,10 @@ func scTestPod(hostIPC bool, hostPID bool) *v1.Pod {
return
pod
}
var
_
=
SIGDescribe
(
"Security Context
[Feature:SecurityContext]
"
,
func
()
{
var
_
=
SIGDescribe
(
"Security Context"
,
func
()
{
f
:=
framework
.
NewDefaultFramework
(
"security-context"
)
It
(
"should support pod.Spec.SecurityContext.SupplementalGroups"
,
func
()
{
It
(
"should support pod.Spec.SecurityContext.SupplementalGroups
[LinuxOnly]
"
,
func
()
{
pod
:=
scTestPod
(
false
,
false
)
pod
.
Spec
.
Containers
[
0
]
.
Command
=
[]
string
{
"id"
,
"-G"
}
pod
.
Spec
.
SecurityContext
.
SupplementalGroups
=
[]
int64
{
1234
,
5678
}
...
...
@@ -71,7 +71,7 @@ var _ = SIGDescribe("Security Context [Feature:SecurityContext]", func() {
f
.
TestContainerOutput
(
"pod.Spec.SecurityContext.SupplementalGroups"
,
pod
,
0
,
groups
)
})
It
(
"should support pod.Spec.SecurityContext.RunAsUser"
,
func
()
{
It
(
"should support pod.Spec.SecurityContext.RunAsUser
[LinuxOnly]
"
,
func
()
{
pod
:=
scTestPod
(
false
,
false
)
userID
:=
int64
(
1001
)
pod
.
Spec
.
SecurityContext
.
RunAsUser
=
&
userID
...
...
@@ -83,7 +83,7 @@ var _ = SIGDescribe("Security Context [Feature:SecurityContext]", func() {
})
})
It
(
"should support pod.Spec.SecurityContext.RunAsUser And pod.Spec.SecurityContext.RunAsGroup [
Feature:RunAsGroup
]"
,
func
()
{
It
(
"should support pod.Spec.SecurityContext.RunAsUser And pod.Spec.SecurityContext.RunAsGroup [
LinuxOnly
]"
,
func
()
{
pod
:=
scTestPod
(
false
,
false
)
userID
:=
int64
(
1001
)
groupID
:=
int64
(
2002
)
...
...
@@ -97,7 +97,7 @@ var _ = SIGDescribe("Security Context [Feature:SecurityContext]", func() {
})
})
It
(
"should support container.SecurityContext.RunAsUser"
,
func
()
{
It
(
"should support container.SecurityContext.RunAsUser
[LinuxOnly]
"
,
func
()
{
pod
:=
scTestPod
(
false
,
false
)
userID
:=
int64
(
1001
)
overrideUserID
:=
int64
(
1002
)
...
...
@@ -112,7 +112,7 @@ var _ = SIGDescribe("Security Context [Feature:SecurityContext]", func() {
})
})
It
(
"should support container.SecurityContext.RunAsUser And container.SecurityContext.RunAsGroup [
Feature:RunAsGroup
]"
,
func
()
{
It
(
"should support container.SecurityContext.RunAsUser And container.SecurityContext.RunAsGroup [
LinuxOnly
]"
,
func
()
{
pod
:=
scTestPod
(
false
,
false
)
userID
:=
int64
(
1001
)
groupID
:=
int64
(
2001
)
...
...
@@ -131,19 +131,19 @@ var _ = SIGDescribe("Security Context [Feature:SecurityContext]", func() {
})
})
It
(
"should support volume SELinux relabeling"
,
func
()
{
It
(
"should support volume SELinux relabeling
[Flaky] [LinuxOnly]
"
,
func
()
{
testPodSELinuxLabeling
(
f
,
false
,
false
)
})
It
(
"should support volume SELinux relabeling when using hostIPC"
,
func
()
{
It
(
"should support volume SELinux relabeling when using hostIPC
[Flaky] [LinuxOnly]
"
,
func
()
{
testPodSELinuxLabeling
(
f
,
true
,
false
)
})
It
(
"should support volume SELinux relabeling when using hostPID"
,
func
()
{
It
(
"should support volume SELinux relabeling when using hostPID
[Flaky] [LinuxOnly]
"
,
func
()
{
testPodSELinuxLabeling
(
f
,
false
,
true
)
})
It
(
"should support seccomp alpha unconfined annotation on the container [Feature:Seccomp]"
,
func
()
{
It
(
"should support seccomp alpha unconfined annotation on the container [Feature:Seccomp]
[LinuxOnly]
"
,
func
()
{
// TODO: port to SecurityContext as soon as seccomp is out of alpha
pod
:=
scTestPod
(
false
,
false
)
pod
.
Annotations
[
v1
.
SeccompContainerAnnotationKeyPrefix
+
"test-container"
]
=
"unconfined"
...
...
@@ -152,7 +152,7 @@ var _ = SIGDescribe("Security Context [Feature:SecurityContext]", func() {
f
.
TestContainerOutput
(
v1
.
SeccompPodAnnotationKey
,
pod
,
0
,
[]
string
{
"0"
})
// seccomp disabled
})
It
(
"should support seccomp alpha unconfined annotation on the pod [Feature:Seccomp]"
,
func
()
{
It
(
"should support seccomp alpha unconfined annotation on the pod [Feature:Seccomp]
[LinuxOnly]
"
,
func
()
{
// TODO: port to SecurityContext as soon as seccomp is out of alpha
pod
:=
scTestPod
(
false
,
false
)
pod
.
Annotations
[
v1
.
SeccompPodAnnotationKey
]
=
"unconfined"
...
...
@@ -160,7 +160,7 @@ var _ = SIGDescribe("Security Context [Feature:SecurityContext]", func() {
f
.
TestContainerOutput
(
v1
.
SeccompPodAnnotationKey
,
pod
,
0
,
[]
string
{
"0"
})
// seccomp disabled
})
It
(
"should support seccomp alpha runtime/default annotation [Feature:Seccomp]"
,
func
()
{
It
(
"should support seccomp alpha runtime/default annotation [Feature:Seccomp]
[LinuxOnly]
"
,
func
()
{
// TODO: port to SecurityContext as soon as seccomp is out of alpha
pod
:=
scTestPod
(
false
,
false
)
pod
.
Annotations
[
v1
.
SeccompContainerAnnotationKeyPrefix
+
"test-container"
]
=
v1
.
SeccompProfileRuntimeDefault
...
...
@@ -168,7 +168,7 @@ var _ = SIGDescribe("Security Context [Feature:SecurityContext]", func() {
f
.
TestContainerOutput
(
v1
.
SeccompPodAnnotationKey
,
pod
,
0
,
[]
string
{
"2"
})
// seccomp filtered
})
It
(
"should support seccomp default which is unconfined [Feature:Seccomp]"
,
func
()
{
It
(
"should support seccomp default which is unconfined [Feature:Seccomp]
[LinuxOnly]
"
,
func
()
{
// TODO: port to SecurityContext as soon as seccomp is out of alpha
pod
:=
scTestPod
(
false
,
false
)
pod
.
Spec
.
Containers
[
0
]
.
Command
=
[]
string
{
"grep"
,
"ecc"
,
"/proc/self/status"
}
...
...
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