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
99a52350
Unverified
Commit
99a52350
authored
Apr 09, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Apr 09, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #76309 from jiatongw/e2e_gpu
Clean up and remove blank lines
parents
466abb01
df2072dd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
gpu_util.go
test/e2e/framework/gpu_util.go
+1
-5
No files found.
test/e2e/framework/gpu_util.go
View file @
99a52350
...
@@ -17,7 +17,7 @@ limitations under the License.
...
@@ -17,7 +17,7 @@ limitations under the License.
package
framework
package
framework
import
(
import
(
"k8s.io/api/core/v1"
v1
"k8s.io/api/core/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/uuid"
"k8s.io/apimachinery/pkg/util/uuid"
"k8s.io/klog"
"k8s.io/klog"
...
@@ -40,11 +40,9 @@ const (
...
@@ -40,11 +40,9 @@ const (
// TODO make this generic and not linked to COS only
// TODO make this generic and not linked to COS only
func
NumberOfNVIDIAGPUs
(
node
*
v1
.
Node
)
int64
{
func
NumberOfNVIDIAGPUs
(
node
*
v1
.
Node
)
int64
{
val
,
ok
:=
node
.
Status
.
Capacity
[
NVIDIAGPUResourceName
]
val
,
ok
:=
node
.
Status
.
Capacity
[
NVIDIAGPUResourceName
]
if
!
ok
{
if
!
ok
{
return
0
return
0
}
}
return
val
.
Value
()
return
val
.
Value
()
}
}
...
@@ -57,12 +55,10 @@ func NVIDIADevicePlugin() *v1.Pod {
...
@@ -57,12 +55,10 @@ func NVIDIADevicePlugin() *v1.Pod {
Name
:
"device-plugin-nvidia-gpu-"
+
string
(
uuid
.
NewUUID
()),
Name
:
"device-plugin-nvidia-gpu-"
+
string
(
uuid
.
NewUUID
()),
Namespace
:
metav1
.
NamespaceSystem
,
Namespace
:
metav1
.
NamespaceSystem
,
},
},
Spec
:
ds
.
Spec
.
Template
.
Spec
,
Spec
:
ds
.
Spec
.
Template
.
Spec
,
}
}
// Remove node affinity
// Remove node affinity
p
.
Spec
.
Affinity
=
nil
p
.
Spec
.
Affinity
=
nil
return
p
return
p
}
}
...
...
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