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
827dd340
Unverified
Commit
827dd340
authored
Mar 16, 2017
by
Tim St. Clair
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Relax 'misc' container memory constraints
parent
9a1236ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
25 deletions
+39
-25
summary_test.go
test/e2e_node/summary_test.go
+39
-25
No files found.
test/e2e_node/summary_test.go
View file @
827dd340
...
...
@@ -69,36 +69,50 @@ var _ = framework.KubeDescribe("Summary API", func() {
)
fsCapacityBounds
:=
bounded
(
100
*
mb
,
100
*
gb
)
// Expectations for system containers.
sysContExpectations
:=
gstruct
.
MatchAllFields
(
gstruct
.
Fields
{
"Name"
:
gstruct
.
Ignore
(),
"StartTime"
:
recent
(
maxStartAge
),
"CPU"
:
ptrMatchAllFields
(
gstruct
.
Fields
{
"Time"
:
recent
(
maxStatsAge
),
"UsageNanoCores"
:
bounded
(
10000
,
2E9
),
"UsageCoreNanoSeconds"
:
bounded
(
10000000
,
1E15
),
}),
"Memory"
:
ptrMatchAllFields
(
gstruct
.
Fields
{
"Time"
:
recent
(
maxStatsAge
),
// We don't limit system container memory.
"AvailableBytes"
:
BeNil
(),
"UsageBytes"
:
bounded
(
1
*
mb
,
10
*
gb
),
"WorkingSetBytes"
:
bounded
(
1
*
mb
,
10
*
gb
),
"RSSBytes"
:
bounded
(
1
*
mb
,
1
*
gb
),
"PageFaults"
:
bounded
(
1000
,
1E9
),
"MajorPageFaults"
:
bounded
(
0
,
100000
),
}),
"Rootfs"
:
BeNil
(),
"Logs"
:
BeNil
(),
"UserDefinedMetrics"
:
BeEmpty
(),
})
sysContExpectations
:=
func
()
types
.
GomegaMatcher
{
return
gstruct
.
MatchAllFields
(
gstruct
.
Fields
{
"Name"
:
gstruct
.
Ignore
(),
"StartTime"
:
recent
(
maxStartAge
),
"CPU"
:
ptrMatchAllFields
(
gstruct
.
Fields
{
"Time"
:
recent
(
maxStatsAge
),
"UsageNanoCores"
:
bounded
(
10000
,
2E9
),
"UsageCoreNanoSeconds"
:
bounded
(
10000000
,
1E15
),
}),
"Memory"
:
ptrMatchAllFields
(
gstruct
.
Fields
{
"Time"
:
recent
(
maxStatsAge
),
// We don't limit system container memory.
"AvailableBytes"
:
BeNil
(),
"UsageBytes"
:
bounded
(
1
*
mb
,
10
*
gb
),
"WorkingSetBytes"
:
bounded
(
1
*
mb
,
10
*
gb
),
"RSSBytes"
:
bounded
(
1
*
mb
,
1
*
gb
),
"PageFaults"
:
bounded
(
1000
,
1E9
),
"MajorPageFaults"
:
bounded
(
0
,
100000
),
}),
"Rootfs"
:
BeNil
(),
"Logs"
:
BeNil
(),
"UserDefinedMetrics"
:
BeEmpty
(),
})
}
systemContainers
:=
gstruct
.
Elements
{
"kubelet"
:
sysContExpectations
,
"runtime"
:
sysContExpectations
,
"kubelet"
:
sysContExpectations
()
,
"runtime"
:
sysContExpectations
()
,
}
// The Kubelet only manages the 'misc' system container if the host is not running systemd.
if
!
systemdutil
.
IsRunningSystemd
()
{
framework
.
Logf
(
"Host not running systemd; expecting 'misc' system container."
)
systemContainers
[
"misc"
]
=
sysContExpectations
miscContExpectations
:=
sysContExpectations
()
.
(
*
gstruct
.
FieldsMatcher
)
// Misc processes are system-dependent, so relax the memory constraints.
miscContExpectations
.
Fields
[
"Memory"
]
=
ptrMatchAllFields
(
gstruct
.
Fields
{
"Time"
:
recent
(
maxStatsAge
),
// We don't limit system container memory.
"AvailableBytes"
:
BeNil
(),
"UsageBytes"
:
bounded
(
100
*
kb
,
10
*
gb
),
"WorkingSetBytes"
:
bounded
(
100
*
kb
,
10
*
gb
),
"RSSBytes"
:
bounded
(
100
*
kb
,
1
*
gb
),
"PageFaults"
:
bounded
(
1000
,
1E9
),
"MajorPageFaults"
:
bounded
(
0
,
100000
),
})
systemContainers
[
"misc"
]
=
miscContExpectations
}
// Expectations for pods.
podExpectations
:=
gstruct
.
MatchAllFields
(
gstruct
.
Fields
{
...
...
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