From 3c4548723760d7ab34d835e16d1dccf96057a533 Mon Sep 17 00:00:00 2001 From: Alex Collins Date: Thu, 7 Oct 2021 09:00:02 -0700 Subject: [PATCH] feat: tune CPU resources --- api/v1alpha1/const.go | 2 +- api/v1alpha1/step_types_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/v1alpha1/const.go b/api/v1alpha1/const.go index fdc28905..ae20f6c2 100644 --- a/api/v1alpha1/const.go +++ b/api/v1alpha1/const.go @@ -62,7 +62,7 @@ var KeyKillCmd = func(x string) string { // the standard resources used by the `init`, `sidecar` and built-in step containers. var standardResources = corev1.ResourceRequirements{ Limits: corev1.ResourceList{ - "cpu": resource.MustParse("500m"), + "cpu": resource.MustParse("200m"), "memory": resource.MustParse("256Mi"), }, Requests: corev1.ResourceList{ diff --git a/api/v1alpha1/step_types_test.go b/api/v1alpha1/step_types_test.go index 46c7d278..a2f7c558 100644 --- a/api/v1alpha1/step_types_test.go +++ b/api/v1alpha1/step_types_test.go @@ -21,7 +21,7 @@ func TestStep_GetPodSpec(t *testing.T) { {Name: "ARGO_DATAFLOW_POD", ValueFrom: &corev1.EnvVarSource{FieldRef: &corev1.ObjectFieldSelector{FieldPath: "metadata.name"}}}, {Name: "ARGO_DATAFLOW_PIPELINE_NAME", Value: "my-pl"}, {Name: "ARGO_DATAFLOW_REPLICA", Value: fmt.Sprintf("%d", replica)}, - {Name: "ARGO_DATAFLOW_STEP", Value: `{"metadata":{"creationTimestamp":null},"spec":{"name":"main","cat":{"resources":{"limits":{"cpu":"500m","memory":"256Mi"},"requests":{"cpu":"100m","memory":"64Mi"}}},"scale":{},"sidecar":{"resources":{}}},"status":{"phase":"","replicas":0,"lastScaledAt":null}}`}, + {Name: "ARGO_DATAFLOW_STEP", Value: `{"metadata":{"creationTimestamp":null},"spec":{"name":"main","cat":{"resources":{"limits":{"cpu":"200m","memory":"256Mi"},"requests":{"cpu":"100m","memory":"64Mi"}}},"scale":{},"sidecar":{"resources":{}}},"status":{"phase":"","replicas":0,"lastScaledAt":null}}`}, {Name: "ARGO_DATAFLOW_UPDATE_INTERVAL", Value: "1m0s"}, {Name: "GODEBUG"}, }