Skip to content

Commit

Permalink
Set CPU & Memory requests for compaction job (#853) (#878)
Browse files Browse the repository at this point in the history
  • Loading branch information
anveshreddy18 authored Sep 20, 2024
1 parent ef09eed commit c34a115
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions controllers/compaction/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
coordinationv1 "k8s.io/api/coordination/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/component-base/featuregate"
Expand Down Expand Up @@ -309,6 +310,12 @@ func (r *Reconciler) createCompactionJob(ctx context.Context, logger logr.Logger
Image: *etcdBackupImage,
ImagePullPolicy: v1.PullIfNotPresent,
Args: getCompactionJobArgs(etcd, r.config.MetricsScrapeWaitDuration.String()),
Resources: v1.ResourceRequirements{
Requests: v1.ResourceList{
v1.ResourceCPU: resource.MustParse("600m"),
v1.ResourceMemory: resource.MustParse("3Gi"),
},
},
}},
},
},
Expand Down

0 comments on commit c34a115

Please sign in to comment.