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
fee083fe
Commit
fee083fe
authored
Feb 26, 2018
by
Jiaying Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update device plugin e2e_node test to not changing Kubelet config
as DevicePlugins feature is enabled by default now.
parent
456ebf5d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
23 deletions
+2
-23
device_plugin.go
test/e2e_node/device_plugin.go
+1
-12
gpu_device_plugin.go
test/e2e_node/gpu_device_plugin.go
+1
-11
No files found.
test/e2e_node/device_plugin.go
View file @
fee083fe
...
@@ -29,8 +29,6 @@ import (
...
@@ -29,8 +29,6 @@ import (
"k8s.io/apimachinery/pkg/util/uuid"
"k8s.io/apimachinery/pkg/util/uuid"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kubernetes/pkg/features"
"k8s.io/kubernetes/pkg/kubelet/apis/kubeletconfig"
"k8s.io/kubernetes/test/e2e/framework"
"k8s.io/kubernetes/test/e2e/framework"
pluginapi
"k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1beta1"
pluginapi
"k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1beta1"
...
@@ -46,20 +44,11 @@ const (
...
@@ -46,20 +44,11 @@ const (
)
)
// Serial because the test restarts Kubelet
// Serial because the test restarts Kubelet
var
_
=
framework
.
KubeDescribe
(
"Device Plugin [Feature:DevicePlugin]
[Serial] [Disruptive]
"
,
func
()
{
var
_
=
framework
.
KubeDescribe
(
"Device Plugin [Feature:DevicePlugin]"
,
func
()
{
f
:=
framework
.
NewDefaultFramework
(
"device-plugin-errors"
)
f
:=
framework
.
NewDefaultFramework
(
"device-plugin-errors"
)
Context
(
"DevicePlugin"
,
func
()
{
Context
(
"DevicePlugin"
,
func
()
{
By
(
"Enabling support for Device Plugin"
)
tempSetCurrentKubeletConfig
(
f
,
func
(
initialConfig
*
kubeletconfig
.
KubeletConfiguration
)
{
initialConfig
.
FeatureGates
[
string
(
features
.
DevicePlugins
)]
=
true
})
It
(
"Verifies the Kubelet device plugin functionality."
,
func
()
{
It
(
"Verifies the Kubelet device plugin functionality."
,
func
()
{
By
(
"Wait for node is ready"
)
framework
.
WaitForAllNodesSchedulable
(
f
.
ClientSet
,
framework
.
TestContext
.
NodeSchedulableTimeout
)
By
(
"Start stub device plugin"
)
By
(
"Start stub device plugin"
)
// fake devices for e2e test
// fake devices for e2e test
devs
:=
[]
*
pluginapi
.
Device
{
devs
:=
[]
*
pluginapi
.
Device
{
...
...
test/e2e_node/gpu_device_plugin.go
View file @
fee083fe
...
@@ -22,8 +22,6 @@ import (
...
@@ -22,8 +22,6 @@ import (
"k8s.io/api/core/v1"
"k8s.io/api/core/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kubernetes/pkg/features"
"k8s.io/kubernetes/pkg/kubelet/apis/kubeletconfig"
kubeletmetrics
"k8s.io/kubernetes/pkg/kubelet/metrics"
kubeletmetrics
"k8s.io/kubernetes/pkg/kubelet/metrics"
"k8s.io/kubernetes/test/e2e/framework"
"k8s.io/kubernetes/test/e2e/framework"
"k8s.io/kubernetes/test/e2e/framework/metrics"
"k8s.io/kubernetes/test/e2e/framework/metrics"
...
@@ -34,8 +32,7 @@ import (
...
@@ -34,8 +32,7 @@ import (
)
)
const
(
const
(
devicePluginFeatureGate
=
"DevicePlugins=true"
testPodNamePrefix
=
"nvidia-gpu-"
testPodNamePrefix
=
"nvidia-gpu-"
)
)
// Serial because the test restarts Kubelet
// Serial because the test restarts Kubelet
...
@@ -43,11 +40,6 @@ var _ = framework.KubeDescribe("NVIDIA GPU Device Plugin [Feature:GPUDevicePlugi
...
@@ -43,11 +40,6 @@ var _ = framework.KubeDescribe("NVIDIA GPU Device Plugin [Feature:GPUDevicePlugi
f
:=
framework
.
NewDefaultFramework
(
"device-plugin-gpus-errors"
)
f
:=
framework
.
NewDefaultFramework
(
"device-plugin-gpus-errors"
)
Context
(
"DevicePlugin"
,
func
()
{
Context
(
"DevicePlugin"
,
func
()
{
By
(
"Enabling support for Device Plugin"
)
tempSetCurrentKubeletConfig
(
f
,
func
(
initialConfig
*
kubeletconfig
.
KubeletConfiguration
)
{
initialConfig
.
FeatureGates
[
string
(
features
.
DevicePlugins
)]
=
true
})
var
devicePluginPod
*
v1
.
Pod
var
devicePluginPod
*
v1
.
Pod
BeforeEach
(
func
()
{
BeforeEach
(
func
()
{
By
(
"Ensuring that Nvidia GPUs exists on the node"
)
By
(
"Ensuring that Nvidia GPUs exists on the node"
)
...
@@ -55,8 +47,6 @@ var _ = framework.KubeDescribe("NVIDIA GPU Device Plugin [Feature:GPUDevicePlugi
...
@@ -55,8 +47,6 @@ var _ = framework.KubeDescribe("NVIDIA GPU Device Plugin [Feature:GPUDevicePlugi
Skip
(
"Nvidia GPUs do not exist on the node. Skipping test."
)
Skip
(
"Nvidia GPUs do not exist on the node. Skipping test."
)
}
}
framework
.
WaitForAllNodesSchedulable
(
f
.
ClientSet
,
framework
.
TestContext
.
NodeSchedulableTimeout
)
By
(
"Creating the Google Device Plugin pod for NVIDIA GPU in GKE"
)
By
(
"Creating the Google Device Plugin pod for NVIDIA GPU in GKE"
)
devicePluginPod
=
f
.
PodClient
()
.
CreateSync
(
framework
.
NVIDIADevicePlugin
(
f
.
Namespace
.
Name
))
devicePluginPod
=
f
.
PodClient
()
.
CreateSync
(
framework
.
NVIDIADevicePlugin
(
f
.
Namespace
.
Name
))
...
...
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