mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +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.
|
||||
type ResourceUsageSummary map[string][]SingleContainerSummary
|
||||
|
||||
const NoCPUConstraint = math.MaxFloat64
|
||||
|
||||
func (s *ResourceUsageSummary) PrintHumanReadable() string {
|
||||
buf := &bytes.Buffer{}
|
||||
w := tabwriter.NewWriter(buf, 1, 0, 1, ' ', 0)
|
||||
|
@ -224,6 +224,14 @@ func density30AddonResourceVerifier(numNodes int) map[string]framework.ResourceC
|
||||
CPUConstraint: schedulerCPU,
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -232,6 +232,8 @@ var _ = SIGDescribe("Load capacity", func() {
|
||||
framework.ExpectNoError(CreateQuotas(f, namespaces, 2*totalPods, testPhaseDurations.StartPhase(115, "quota creation")))
|
||||
}
|
||||
|
||||
f.AddonResourceConstraints = loadResourceConstraints()
|
||||
|
||||
serviceCreationPhase := testPhaseDurations.StartPhase(120, "services creation")
|
||||
defer serviceCreationPhase.End()
|
||||
if itArg.services {
|
||||
@ -429,6 +431,19 @@ func computePodCounts(total int) (int, int, int) {
|
||||
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(
|
||||
totalPods int,
|
||||
image string,
|
||||
|
Loading…
Reference in New Issue
Block a user