fix(cockroach): change resources for crdb (#2049)

* fix(cockroach): change resources for crdb

* fix: unit test for resource change
This commit is contained in:
Stefan Benz 2021-07-22 11:00:08 +02:00 committed by GitHub
parent 0a6f6b6422
commit 26e4e607bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -307,12 +307,12 @@ func getJoinExec(namespace string, name string, dbPort int, replicaCount int) st
func getResources(resourcesSFS *k8s.Resources) corev1.ResourceRequirements { func getResources(resourcesSFS *k8s.Resources) corev1.ResourceRequirements {
internalResources := corev1.ResourceRequirements{ internalResources := corev1.ResourceRequirements{
Requests: corev1.ResourceList{ Requests: corev1.ResourceList{
"cpu": resource.MustParse("100m"), "cpu": resource.MustParse("1"),
"memory": resource.MustParse("512Mi"), "memory": resource.MustParse("6Gi"),
}, },
Limits: corev1.ResourceList{ Limits: corev1.ResourceList{
"cpu": resource.MustParse("100m"), "cpu": resource.MustParse("4"),
"memory": resource.MustParse("512Mi"), "memory": resource.MustParse("8Gi"),
}, },
} }

View File

@ -49,12 +49,12 @@ func TestStatefulset_JoinExec2(t *testing.T) {
func TestStatefulset_Resources0(t *testing.T) { func TestStatefulset_Resources0(t *testing.T) {
equals := corev1.ResourceRequirements{ equals := corev1.ResourceRequirements{
Requests: corev1.ResourceList{ Requests: corev1.ResourceList{
"cpu": resource.MustParse("100m"), "cpu": resource.MustParse("1"),
"memory": resource.MustParse("512Mi"), "memory": resource.MustParse("6Gi"),
}, },
Limits: corev1.ResourceList{ Limits: corev1.ResourceList{
"cpu": resource.MustParse("100m"), "cpu": resource.MustParse("4"),
"memory": resource.MustParse("512Mi"), "memory": resource.MustParse("8Gi"),
}, },
} }