Skip to content

[Bug]: Size Limit setting for emptyDir causes StackOverError in strimzi operator #12067

@ssh4sha

Description

@ssh4sha

Bug Description

I've been trying to create an emptyDir through the kafkaNodePool to use as cache for remote tiered storage segments but the operator runs in to stackOverflow error while trying to parse the emptyDir sizeLimit config.

This is pod template in kafkaNodePool CR:

template:
  pod:
    volumes:
      - name: cache-volume
        emptyDir:
          medium: Memory
          sizeLimit:
            amount: "1"
            format: "Gi"

This is the error in operator logs:

2025-10-23 02:58:04 ERROR ResourceVisitor:95 - Reconciliation #9733(watch) Kafka(kafka-shared/tiered-storage): Error while visiting [spec, kafka, template, pod, volumes, emptyDir, sizeLimit, numericalAmount, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO,

Also tried the k8s native way to set the sizeLimit but it seems the the strimzi spec doesn't support it

volumes:
  - name: tiered-storage-cache
    emptyDir:
      medium: Memory
      sizeLimit: "9Gi"`

Error:

Error: INSTALLATION FAILED: 1 error occurred: * KafkaNodePool.kafka.strimzi.io "broker-tiered-storage" is invalid: spec.template.pod.volumes[3].emptyDir.sizeLimit: Invalid value: "string": spec.template.pod.volumes[3].emptyDir.sizeLimit in body must be of type object: "string"

Steps to reproduce

  1. Create an emptyDir volume with sizeLimit in kafkaNodePool.

Expected behavior

There should be an emptyDir volume created with the provided size limit,

Strimzi version

0.47.0

Kubernetes version

v1.30.3

Installation method

helm chart

Infrastructure

No response

Configuration files and logs

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions