fix(etcd): size the defrag job for the client it runs

The hourly defrag pod runs the etcd-defrag client, which only sends
defragment calls to the members, yet it requested 200m CPU and 256Mi
from the tenant quota. On a sandbox tenant whose quota was mostly taken
by its own etcd and SeaweedFS, the job could not create a pod and the
defrag never ran. The client peaked at 5.1 MiB working set over a day
on a v1.6.5 cluster.

Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
This commit is contained in:
Yan Bondarenko committed 2026-10-25 17:09:16 +03:00
1 parent 55aad6f914
commit 61289c7210
2 files changed
+17 -4

No files matched your search

@@ -29,11 +29,11 @@ spec:
drop: ["ALL"]
resources:
requests:
cpu: 200m
memory: 256Mi
cpu: 10m
memory: 32Mi
limits:
cpu: 500m
memory: 512Mi
cpu: 100m
memory: 64Mi
args:
# The v1alpha2 operator names the headless Service after the
# cluster ({{ $.Release.Name }}) and does not use StatefulSet
@@ -41,3 +41,16 @@ tests:
documentSelector:
path: kind
value: EtcdCluster
- it: asks the tenant quota only for what the defrag client uses
template: templates/etcd-defrag.yaml
asserts:
- equal:
path: spec.jobTemplate.spec.template.spec.containers[0].resources
value:
requests:
cpu: 10m
memory: 32Mi
limits:
cpu: 100m
memory: 64Mi