Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Kibana memory only for 8.1.x in e2e tests. #7836

Merged
merged 1 commit into from
May 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion test/e2e/test/kibana/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"fmt"

corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/rand"
Expand Down Expand Up @@ -69,7 +70,7 @@ func newBuilder(name, randSuffix string) Builder {
Name: name,
Namespace: test.Ctx().ManagedNamespace(0),
}
return Builder{
b := Builder{
Kibana: kbv1.Kibana{
ObjectMeta: meta,
Spec: kbv1.KibanaSpec{
Expand All @@ -85,6 +86,20 @@ func newBuilder(name, randSuffix string) Builder {
WithSuffix(randSuffix).
WithLabel(run.TestNameLabel, name).
WithPodLabel(run.TestNameLabel, name)

// bump Kibana memory in 8.1.x as we see abnormal memory usage, probably due to the
// move to cgroups v2 (https://github.com/kubernetes/kubernetes/issues/118916)
ver := version.MustParse(test.Ctx().ElasticStackVersion)
if ver.GTE(version.MinFor(8, 1, 0)) && ver.LT(version.MinFor(8, 2, 0)) {
b = b.WithResources(corev1.ResourceRequirements{
Requests: map[corev1.ResourceName]resource.Quantity{
corev1.ResourceMemory: resource.MustParse("1500Mi"),
},
Limits: map[corev1.ResourceName]resource.Quantity{
corev1.ResourceMemory: resource.MustParse("1500Mi"),
}})
}
return b
}

func (b Builder) WithImage(image string) Builder {
Expand Down