mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-04 06:03:05 +09:00
fix(kafka): set entity-operator resources to avoid OOM under tenant LimitRange
entityOperator.topicOperator/userOperator carried no resources, so in tenant namespaces (the LimitRange defaults containers to 128Mi) the JVM topic-operator and user-operator are OOMKilled on startup. The entity-operator stays in CrashLoopBackOff, KafkaTopics/KafkaUsers never reconcile, and on teardown topics get stuck on the strimzi.io/topic-operator finalizer. Set explicit requests/limits (256Mi/512Mi) so they no longer inherit the namespace default; add a template test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
This commit is contained in:
1 parent
27442bd31c
commit
1ab5f17cac
2 files changed
+31
-2
No files matched your search
@@ -97,8 +97,25 @@ spec:
|
||||
name: {{ .Release.Name }}-metrics
|
||||
key: kafka-metrics-config.yml
|
||||
entityOperator:
|
||||
topicOperator: {}
|
||||
userOperator: {}
|
||||
# Tenant namespaces ship a LimitRange that defaults containers to 128Mi.
|
||||
# The topic-operator and user-operator are JVM processes and OOMKill at
|
||||
# that default, leaving the entity-operator in CrashLoopBackOff so
|
||||
# KafkaTopics/KafkaUsers never reconcile. Set explicit resources so they
|
||||
# don't inherit the namespace default.
|
||||
topicOperator:
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
memory: 512Mi
|
||||
userOperator:
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
memory: 512Mi
|
||||
template:
|
||||
# `pod` accepts metadata + a flat set of pod-spec fields
|
||||
# (enableServiceLinks, securityContext, affinity, …) directly.
|
||||
|
||||
@@ -20,3 +20,15 @@ tests:
|
||||
# the phantom template.spec key must not reappear
|
||||
- notExists:
|
||||
path: spec.entityOperator.template.spec
|
||||
|
||||
- it: topic-operator and user-operator set explicit resources (avoid 128Mi LimitRange OOM)
|
||||
release:
|
||||
name: test-kafka
|
||||
namespace: tenant-test
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.entityOperator.topicOperator.resources.limits.memory
|
||||
value: 512Mi
|
||||
- equal:
|
||||
path: spec.entityOperator.userOperator.resources.limits.memory
|
||||
value: 512Mi
|
||||
Reference in new issue
Block a user