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
b2d24322
Unverified
Commit
b2d24322
authored
Jan 29, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Jan 29, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #73234 from baltendo/master
Fix golint failures
parents
6ebe874d
736f35ec
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
2 deletions
+6
-2
.golint_failures
hack/.golint_failures
+0
-2
checkpoint.go
pkg/kubelet/cm/devicemanager/checkpoint/checkpoint.go
+4
-0
cgroups_linux.go
pkg/kubelet/cm/util/cgroups_linux.go
+1
-0
cgroups_unsupported.go
pkg/kubelet/cm/util/cgroups_unsupported.go
+1
-0
No files found.
hack/.golint_failures
View file @
b2d24322
...
@@ -191,8 +191,6 @@ pkg/kubelet/checkpointmanager/checksum
...
@@ -191,8 +191,6 @@ pkg/kubelet/checkpointmanager/checksum
pkg/kubelet/checkpointmanager/testing/example_checkpoint_formats/v1
pkg/kubelet/checkpointmanager/testing/example_checkpoint_formats/v1
pkg/kubelet/client
pkg/kubelet/client
pkg/kubelet/cm
pkg/kubelet/cm
pkg/kubelet/cm/devicemanager/checkpoint
pkg/kubelet/cm/util
pkg/kubelet/config
pkg/kubelet/config
pkg/kubelet/configmap
pkg/kubelet/configmap
pkg/kubelet/container
pkg/kubelet/container
...
...
pkg/kubelet/cm/devicemanager/checkpoint/checkpoint.go
View file @
b2d24322
...
@@ -23,11 +23,13 @@ import (
...
@@ -23,11 +23,13 @@ import (
"k8s.io/kubernetes/pkg/kubelet/checkpointmanager/checksum"
"k8s.io/kubernetes/pkg/kubelet/checkpointmanager/checksum"
)
)
// DeviceManagerCheckpoint defines the operations to retrieve pod devices
type
DeviceManagerCheckpoint
interface
{
type
DeviceManagerCheckpoint
interface
{
checkpointmanager
.
Checkpoint
checkpointmanager
.
Checkpoint
GetData
()
([]
PodDevicesEntry
,
map
[
string
][]
string
)
GetData
()
([]
PodDevicesEntry
,
map
[
string
][]
string
)
}
}
// PodDevicesEntry connects pod information to devices
type
PodDevicesEntry
struct
{
type
PodDevicesEntry
struct
{
PodUID
string
PodUID
string
ContainerName
string
ContainerName
string
...
@@ -44,6 +46,7 @@ type checkpointData struct {
...
@@ -44,6 +46,7 @@ type checkpointData struct {
RegisteredDevices
map
[
string
][]
string
RegisteredDevices
map
[
string
][]
string
}
}
// Data holds checkpoint data and its checksum
type
Data
struct
{
type
Data
struct
{
Data
checkpointData
Data
checkpointData
Checksum
checksum
.
Checksum
Checksum
checksum
.
Checksum
...
@@ -76,6 +79,7 @@ func (cp *Data) VerifyChecksum() error {
...
@@ -76,6 +79,7 @@ func (cp *Data) VerifyChecksum() error {
return
cp
.
Checksum
.
Verify
(
cp
.
Data
)
return
cp
.
Checksum
.
Verify
(
cp
.
Data
)
}
}
// GetData returns device entries and registered devices
func
(
cp
*
Data
)
GetData
()
([]
PodDevicesEntry
,
map
[
string
][]
string
)
{
func
(
cp
*
Data
)
GetData
()
([]
PodDevicesEntry
,
map
[
string
][]
string
)
{
return
cp
.
Data
.
PodDeviceEntries
,
cp
.
Data
.
RegisteredDevices
return
cp
.
Data
.
PodDeviceEntries
,
cp
.
Data
.
RegisteredDevices
}
}
pkg/kubelet/cm/util/cgroups_linux.go
View file @
b2d24322
...
@@ -23,6 +23,7 @@ import (
...
@@ -23,6 +23,7 @@ import (
libcontainerutils
"github.com/opencontainers/runc/libcontainer/utils"
libcontainerutils
"github.com/opencontainers/runc/libcontainer/utils"
)
)
// GetPids gets pids of the desired cgroup
// Forked from opencontainers/runc/libcontainer/cgroup/fs.Manager.GetPids()
// Forked from opencontainers/runc/libcontainer/cgroup/fs.Manager.GetPids()
func
GetPids
(
cgroupPath
string
)
([]
int
,
error
)
{
func
GetPids
(
cgroupPath
string
)
([]
int
,
error
)
{
dir
,
err
:=
getCgroupPath
(
cgroupPath
)
dir
,
err
:=
getCgroupPath
(
cgroupPath
)
...
...
pkg/kubelet/cm/util/cgroups_unsupported.go
View file @
b2d24322
...
@@ -18,6 +18,7 @@ limitations under the License.
...
@@ -18,6 +18,7 @@ limitations under the License.
package
util
package
util
// GetPids gets pids of the desired cgroup
func
GetPids
(
cgroupPath
string
)
([]
int
,
error
)
{
func
GetPids
(
cgroupPath
string
)
([]
int
,
error
)
{
return
nil
,
nil
return
nil
,
nil
}
}
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