Skip to content

Commit 582a22f

Browse files
authored
Assign 700MB to each node (#1402)
1 parent bd1f682 commit 582a22f

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

system_tests/system_test.go

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ import (
1515
"crypto/x509"
1616
"encoding/json"
1717
"fmt"
18-
"golang.org/x/mod/semver"
1918
"io/ioutil"
2019
"strconv"
2120
"strings"
2221
"time"
2322

23+
"golang.org/x/mod/semver"
24+
corev1 "k8s.io/api/core/v1"
2425
k8sresource "k8s.io/apimachinery/pkg/api/resource"
2526
"k8s.io/apimachinery/pkg/types"
2627

@@ -374,6 +375,14 @@ CONSOLE_LOG=new`
374375
BeforeEach(func() {
375376
cluster = newRabbitmqCluster(namespace, "ha-rabbit")
376377
cluster.Spec.Replicas = pointer.Int32(3)
378+
cluster.Spec.Resources = &corev1.ResourceRequirements{
379+
Requests: corev1.ResourceList{
380+
corev1.ResourceMemory: k8sresource.MustParse("700Mi"),
381+
},
382+
Limits: corev1.ResourceList{
383+
corev1.ResourceMemory: k8sresource.MustParse("700Mi"),
384+
},
385+
}
377386

378387
Expect(createRabbitmqCluster(ctx, rmqClusterClient, cluster)).To(Succeed())
379388
waitForRabbitmqRunning(cluster)
@@ -430,6 +439,14 @@ CONSOLE_LOG=new`
430439
"rabbitmq_mqtt",
431440
"rabbitmq_stomp",
432441
}
442+
cluster.Spec.Resources = &corev1.ResourceRequirements{
443+
Requests: corev1.ResourceList{
444+
corev1.ResourceMemory: k8sresource.MustParse("700Mi"),
445+
},
446+
Limits: corev1.ResourceList{
447+
corev1.ResourceMemory: k8sresource.MustParse("700Mi"),
448+
},
449+
}
433450
Expect(createRabbitmqCluster(ctx, rmqClusterClient, cluster)).To(Succeed())
434451
waitForRabbitmqRunning(cluster)
435452

@@ -571,6 +588,14 @@ CONSOLE_LOG=new`
571588
"rabbitmq_stomp",
572589
"rabbitmq_stream",
573590
}
591+
cluster.Spec.Resources = &corev1.ResourceRequirements{
592+
Requests: corev1.ResourceList{
593+
corev1.ResourceMemory: k8sresource.MustParse("700Mi"),
594+
},
595+
Limits: corev1.ResourceList{
596+
corev1.ResourceMemory: k8sresource.MustParse("700Mi"),
597+
},
598+
}
574599
Expect(createRabbitmqCluster(ctx, rmqClusterClient, cluster)).To(Succeed())
575600
waitForRabbitmqRunning(cluster)
576601
waitForPortReadiness(cluster, 1883) // mqtt

0 commit comments

Comments
 (0)