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
19a588ee
Commit
19a588ee
authored
May 24, 2019
by
Tim Allclair
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a special-cased runtime handler for dockershim
parent
1fba8888
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
docker_sandbox.go
pkg/kubelet/dockershim/docker_sandbox.go
+1
-1
runtimeclass.go
test/e2e/common/runtimeclass.go
+8
-2
No files found.
pkg/kubelet/dockershim/docker_sandbox.go
View file @
19a588ee
...
...
@@ -96,7 +96,7 @@ func (ds *dockerService) RunPodSandbox(ctx context.Context, r *runtimeapi.RunPod
}
// Step 2: Create the sandbox container.
if
r
.
GetRuntimeHandler
()
!=
""
{
if
r
.
GetRuntimeHandler
()
!=
""
&&
r
.
GetRuntimeHandler
()
!=
runtimeName
{
return
nil
,
fmt
.
Errorf
(
"RuntimeHandler %q not supported"
,
r
.
GetRuntimeHandler
())
}
createConfig
,
err
:=
ds
.
makeSandboxDockerConfig
(
config
,
image
)
...
...
test/e2e/common/runtimeclass.go
View file @
19a588ee
...
...
@@ -38,6 +38,9 @@ const (
// PreconfiguredRuntimeHandler is the name of the runtime handler that is expected to be
// preconfigured in the test environment.
PreconfiguredRuntimeHandler
=
"test-handler"
// DockerRuntimeHandler is a hardcoded runtime handler that is accepted by dockershim, and
// treated equivalently to a nil runtime handler.
DockerRuntimeHandler
=
"docker"
)
var
_
=
Describe
(
"[sig-node] RuntimeClass"
,
func
()
{
...
...
@@ -59,9 +62,12 @@ var _ = Describe("[sig-node] RuntimeClass", func() {
// This test requires that the PreconfiguredRuntimeHandler has already been set up on nodes.
It
(
"should run a Pod requesting a RuntimeClass with a configured handler [NodeFeature:RuntimeHandler]"
,
func
()
{
// The built-in docker runtime does not support configuring runtime handlers.
framework
.
SkipIfContainerRuntimeIs
(
"docker"
)
handler
:=
PreconfiguredRuntimeHandler
if
framework
.
TestContext
.
ContainerRuntime
==
"docker"
{
handler
=
DockerRuntimeHandler
}
rcName
:=
createRuntimeClass
(
f
,
"preconfigured-handler"
,
PreconfiguredRuntimeH
andler
)
rcName
:=
createRuntimeClass
(
f
,
"preconfigured-handler"
,
h
andler
)
pod
:=
createRuntimeClassPod
(
f
,
rcName
)
expectPodSuccess
(
f
,
pod
)
})
...
...
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