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
c1746251
Commit
c1746251
authored
Jul 17, 2017
by
Aleksandra Malinowska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add InstanceID to fake cadvisor (used in Kubemark)
parent
54b68a2a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
hollow-node.go
cmd/kubemark/hollow-node.go
+3
-1
cadvisor_fake.go
pkg/kubelet/cadvisor/testing/cadvisor_fake.go
+2
-0
No files found.
cmd/kubemark/hollow-node.go
View file @
c1746251
...
...
@@ -112,7 +112,9 @@ func main() {
}
if
config
.
Morph
==
"kubelet"
{
cadvisorInterface
:=
new
(
cadvisortest
.
Fake
)
cadvisorInterface
:=
&
cadvisortest
.
Fake
{
NodeName
:
config
.
NodeName
,
}
containerManager
:=
cm
.
NewStubContainerManager
()
fakeDockerClient
:=
libdocker
.
NewFakeDockerClient
()
.
WithTraceDisabled
()
fakeDockerClient
.
EnableSleep
=
true
...
...
pkg/kubelet/cadvisor/testing/cadvisor_fake.go
View file @
c1746251
...
...
@@ -25,6 +25,7 @@ import (
// Fake cAdvisor implementation.
type
Fake
struct
{
NodeName
string
}
var
_
cadvisor
.
Interface
=
new
(
Fake
)
...
...
@@ -54,6 +55,7 @@ func (c *Fake) MachineInfo() (*cadvisorapi.MachineInfo, error) {
// We set it to non-zero values to make non-zero-capacity machines in Kubemark.
return
&
cadvisorapi
.
MachineInfo
{
NumCores
:
1
,
InstanceID
:
cadvisorapi
.
InstanceID
(
c
.
NodeName
),
MemoryCapacity
:
4026531840
,
},
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