Skip to content

Commit c429907

Browse files
committed
feat(redis,valkey,rabbitmq,nats,kafka): per-application allocation ratio
Expose resourcesAllocationRatio on the Redis, Valkey, RabbitMQ, NATS and Kafka applications, as cozystack#4907 does for PostgreSQL. cozy-lib already reads the value from the application's own values and falls back to the cluster-wide cpu/memory allocation ratios when it is unset, so the rendered requests are unchanged by default. Set, an instance keeps its limits (from resources or resourcesPreset) while its requests follow the ratio: memory 8 on a 16Gi limit reserves 2Gi. The ratio applies to every pod the application sizes through cozy-lib: the Redis/Valkey data and Sentinel pods, the RabbitMQ and NATS replicas, and the Kafka brokers, whose JVM heap is still sized from the limit. A ratio below 1 is refused by the schema, since the request would exceed the limit. Regenerated with cozyvalues-gen v1.7.0 and controller-gen v0.16.4; one helm unittest suite per application covers the default, a set ratio and the refusal (Valkey's first unit tests). Assisted-by: LLM Signed-off-by: Yasar Rahman <[email protected]>
1 parent bc6bc31 commit c429907

35 files changed

Lines changed: 685 additions & 68 deletions

‎api/apps/v1alpha1/kafka/types.go‎

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apps/v1alpha1/kafka/zz_generated.deepcopy.go‎

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apps/v1alpha1/nats/types.go‎

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apps/v1alpha1/nats/zz_generated.deepcopy.go‎

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apps/v1alpha1/rabbitmq/types.go‎

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apps/v1alpha1/rabbitmq/zz_generated.deepcopy.go‎

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apps/v1alpha1/redis/types.go‎

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apps/v1alpha1/redis/zz_generated.deepcopy.go‎

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apps/v1alpha1/valkey/types.go‎

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apps/v1alpha1/valkey/zz_generated.deepcopy.go‎

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)