mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Merge pull request #69810 from chrisohaver/checkmem
Add DNS container memory check to scalability tests
This commit is contained in:
commit
c30f5269a3
@ -48,6 +48,8 @@ type SingleContainerSummary struct {
|
|||||||
// we can't have int here, as JSON does not accept integer keys.
|
// we can't have int here, as JSON does not accept integer keys.
|
||||||
type ResourceUsageSummary map[string][]SingleContainerSummary
|
type ResourceUsageSummary map[string][]SingleContainerSummary
|
||||||
|
|
||||||
|
const NoCPUConstraint = math.MaxFloat64
|
||||||
|
|
||||||
func (s *ResourceUsageSummary) PrintHumanReadable() string {
|
func (s *ResourceUsageSummary) PrintHumanReadable() string {
|
||||||
buf := &bytes.Buffer{}
|
buf := &bytes.Buffer{}
|
||||||
w := tabwriter.NewWriter(buf, 1, 0, 1, ' ', 0)
|
w := tabwriter.NewWriter(buf, 1, 0, 1, ' ', 0)
|
||||||
|
@ -224,6 +224,14 @@ func density30AddonResourceVerifier(numNodes int) map[string]framework.ResourceC
|
|||||||
CPUConstraint: schedulerCPU,
|
CPUConstraint: schedulerCPU,
|
||||||
MemoryConstraint: schedulerMem,
|
MemoryConstraint: schedulerMem,
|
||||||
}
|
}
|
||||||
|
constraints["coredns"] = framework.ResourceConstraint{
|
||||||
|
CPUConstraint: framework.NoCPUConstraint,
|
||||||
|
MemoryConstraint: 170 * (1024 * 1024),
|
||||||
|
}
|
||||||
|
constraints["kubedns"] = framework.ResourceConstraint{
|
||||||
|
CPUConstraint: framework.NoCPUConstraint,
|
||||||
|
MemoryConstraint: 170 * (1024 * 1024),
|
||||||
|
}
|
||||||
return constraints
|
return constraints
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,6 +232,8 @@ var _ = SIGDescribe("Load capacity", func() {
|
|||||||
framework.ExpectNoError(CreateQuotas(f, namespaces, 2*totalPods, testPhaseDurations.StartPhase(115, "quota creation")))
|
framework.ExpectNoError(CreateQuotas(f, namespaces, 2*totalPods, testPhaseDurations.StartPhase(115, "quota creation")))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
f.AddonResourceConstraints = loadResourceConstraints()
|
||||||
|
|
||||||
serviceCreationPhase := testPhaseDurations.StartPhase(120, "services creation")
|
serviceCreationPhase := testPhaseDurations.StartPhase(120, "services creation")
|
||||||
defer serviceCreationPhase.End()
|
defer serviceCreationPhase.End()
|
||||||
if itArg.services {
|
if itArg.services {
|
||||||
@ -429,6 +431,19 @@ func computePodCounts(total int) (int, int, int) {
|
|||||||
return smallGroupCount, mediumGroupCount, bigGroupCount
|
return smallGroupCount, mediumGroupCount, bigGroupCount
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func loadResourceConstraints() map[string]framework.ResourceConstraint {
|
||||||
|
constraints := make(map[string]framework.ResourceConstraint)
|
||||||
|
constraints["coredns"] = framework.ResourceConstraint{
|
||||||
|
CPUConstraint: framework.NoCPUConstraint,
|
||||||
|
MemoryConstraint: 170 * (1024 * 1024),
|
||||||
|
}
|
||||||
|
constraints["kubedns"] = framework.ResourceConstraint{
|
||||||
|
CPUConstraint: framework.NoCPUConstraint,
|
||||||
|
MemoryConstraint: 170 * (1024 * 1024),
|
||||||
|
}
|
||||||
|
return constraints
|
||||||
|
}
|
||||||
|
|
||||||
func generateConfigs(
|
func generateConfigs(
|
||||||
totalPods int,
|
totalPods int,
|
||||||
image string,
|
image string,
|
||||||
|
Loading…
Reference in New Issue
Block a user