Files
cozystack/packages/apps/kafka/tests/entityoperator_template_test.yaml
T
Myasnikov DaniilandClaude Opus 4.8 1ab5f17cac 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>
2026-06-23 13:44:29 +05:00

35 lines
1.1 KiB
YAML

suite: Kafka entityOperator pod template
# Regression cover for the strict-SSA fix that moved enableServiceLinks out of
# a phantom `entityOperator.template.spec` key (silently dropped by Flux v2.7,
# rejected by v2.8 SSA as "field not declared in schema") into the flat
# `entityOperator.template.pod` set where the Strimzi CRD actually reads it.
templates:
- templates/kafka.yaml
tests:
- it: enableServiceLinks lives under entityOperator.template.pod
release:
name: test-kafka
namespace: tenant-test
asserts:
- equal:
path: spec.entityOperator.template.pod.enableServiceLinks
value: false
# 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