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
a35f4374
Commit
a35f4374
authored
Mar 06, 2015
by
Victor Marmol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update cAdvisor ContainerInfo references to v1 API.
The cAdvisor data structures were versioned recently. We use the v1 versions so this commit makes that explicit.
parent
7e97d22e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
11 deletions
+11
-11
containerinfo.go
pkg/client/containerinfo.go
+1
-1
containerinfo_test.go
pkg/client/containerinfo_test.go
+3
-3
cadvisor.go
pkg/kubelet/cadvisor.go
+1
-1
kubelet_test.go
pkg/kubelet/kubelet_test.go
+1
-1
server.go
pkg/kubelet/server.go
+1
-1
server_test.go
pkg/kubelet/server_test.go
+4
-4
No files found.
pkg/client/containerinfo.go
View file @
a35f4374
...
...
@@ -25,7 +25,7 @@ import (
"net/http"
"strconv"
"github.com/google/cadvisor/info
"
info
"github.com/google/cadvisor/info/v1
"
)
type
ContainerInfoGetter
interface
{
...
...
pkg/client/containerinfo_test.go
View file @
a35f4374
...
...
@@ -28,8 +28,8 @@ import (
"testing"
"time"
"github.com/google/cadvisor/info
"
itest
"github.com/google/cadvisor/info/test"
info
"github.com/google/cadvisor/info/v1
"
itest
"github.com/google/cadvisor/info/
v1/
test"
)
func
testHTTPContainerInfoGetter
(
...
...
@@ -62,7 +62,7 @@ func testHTTPContainerInfoGetter(
// So changing req after Get*Info would be a race.
expectedReq
:=
req
// Fill any empty fields with default value
if
!
reflect
.
DeepEqual
(
expectedReq
,
&
receivedReq
)
{
if
!
expectedReq
.
Equals
(
receivedReq
)
{
t
.
Errorf
(
"received wrong request"
)
}
err
=
json
.
NewEncoder
(
w
)
.
Encode
(
cinfo
)
...
...
pkg/kubelet/cadvisor.go
View file @
a35f4374
...
...
@@ -22,7 +22,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/dockertools"
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
cadvisor
"github.com/google/cadvisor/info"
cadvisor
"github.com/google/cadvisor/info
/v1
"
)
var
(
...
...
pkg/kubelet/kubelet_test.go
View file @
a35f4374
...
...
@@ -41,7 +41,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/fsouza/go-dockerclient"
"github.com/google/cadvisor/info
"
info
"github.com/google/cadvisor/info/v1
"
"github.com/stretchr/testify/mock"
)
...
...
pkg/kubelet/server.go
View file @
a35f4374
...
...
@@ -39,7 +39,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/httpstream"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/httpstream/spdy"
"github.com/golang/glog"
"github.com/google/cadvisor/info
"
info
"github.com/google/cadvisor/info/v1
"
"github.com/prometheus/client_golang/prometheus"
)
...
...
pkg/kubelet/server_test.go
View file @
a35f4374
...
...
@@ -34,7 +34,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/httpstream"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/httpstream/spdy"
"github.com/google/cadvisor/info
"
info
"github.com/google/cadvisor/info/v1
"
)
type
fakeKubelet
struct
{
...
...
@@ -210,7 +210,7 @@ func TestContainerInfo(t *testing.T) {
if
err
!=
nil
{
t
.
Fatalf
(
"received invalid json data: %v"
,
err
)
}
if
!
re
flect
.
DeepEqual
(
&
receivedInfo
,
expectedInfo
)
{
if
!
re
ceivedInfo
.
Eq
(
expectedInfo
)
{
t
.
Errorf
(
"received wrong data: %#v"
,
receivedInfo
)
}
}
...
...
@@ -240,7 +240,7 @@ func TestContainerInfoWithUidNamespace(t *testing.T) {
if
err
!=
nil
{
t
.
Fatalf
(
"received invalid json data: %v"
,
err
)
}
if
!
re
flect
.
DeepEqual
(
&
receivedInfo
,
expectedInfo
)
{
if
!
re
ceivedInfo
.
Eq
(
expectedInfo
)
{
t
.
Errorf
(
"received wrong data: %#v"
,
receivedInfo
)
}
}
...
...
@@ -281,7 +281,7 @@ func TestRootInfo(t *testing.T) {
if
err
!=
nil
{
t
.
Fatalf
(
"received invalid json data: %v"
,
err
)
}
if
!
re
flect
.
DeepEqual
(
&
receivedInfo
,
expectedInfo
)
{
if
!
re
ceivedInfo
.
Eq
(
expectedInfo
)
{
t
.
Errorf
(
"received wrong data: %#v"
,
receivedInfo
)
}
}
...
...
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