Skip to content

Conversation

@scholzj
Copy link
Member

@scholzj scholzj commented Oct 23, 2025

Type of change

  • Bugfix

Description

#12067 describes a pretty nasty bug in our CRDs. The additional volumes in the Pod template use the native Fabric8 EmptyDirVolumeSource class in the API model. However, this class relies on the Fabric8 Quantity class and this class has a structure that our CRDs cannot handle. As a result:

  • The CRDs have a wrong structure for configuring the size limit of the emptyDir volumes, which does not allow using the right Kubernetes format:
              emptyDir:
                sizeLimit: 10Mi
                medium: Memory
    and instead expects something like this:
              emptyDir:
                sizeLimit:
                  amount: 10
                  format: Gi
                medium: Memory
  • However, even with the wrong format generated into the CRDs, Strimzi cannot decode the it and it cannot be used.

This PR creates our own model class to replace the Fabric8 EmptyDirVolumeSource. It does not use Quantity (similarly to our storage configuration) and makes sure the CRDs use the correct layout and Strimzi can handle it.

However, strictly speaking, this breaks the compatibility of the API. Given that it:

  • Introduces the correct layout intended from the beginning
  • This does not work in the existing CRDs / layout anyway
  • This is the first complaint about it, so nobody seems ti be using it

I think it might be ok to do this. But there is some extent of risk worth considering during the review.

This should resolve #12067

Checklist

  • Write tests
  • Make sure all tests pass
  • Update documentation
  • Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally
  • Reference relevant issue(s) and close them after merging

@scholzj scholzj added this to the 0.49.0 milestone Oct 23, 2025
@scholzj scholzj requested a review from ppatierno October 23, 2025 20:14
@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.79%. Comparing base (1ee54de) to head (963b3c0).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #12068      +/-   ##
============================================
+ Coverage     74.78%   74.79%   +0.01%     
- Complexity     6614     6618       +4     
============================================
  Files           376      376              
  Lines         25325    25329       +4     
  Branches       3389     3391       +2     
============================================
+ Hits          18939    18945       +6     
  Misses         4998     4998              
+ Partials       1388     1386       -2     
Files with missing lines Coverage Δ
.../strimzi/operator/cluster/model/TemplateUtils.java 94.00% <100.00%> (+0.52%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@scholzj
Copy link
Member Author

scholzj commented Oct 23, 2025

/gha run pipeline=regression

@github-actions
Copy link

⏳ System test verification started: link

The following 6 job(s) will be executed:

  • regression-brokers-and-security-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-operators-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-operands-amd64 (oracle-vm-8cpu-32gb-x86-64)
  • regression-brokers-and-security-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-operators-arm64 (oracle-vm-8cpu-32gb-arm64)
  • regression-operands-arm64 (oracle-vm-8cpu-32gb-arm64)

Tests will start after successful build completion.

@github-actions
Copy link

🎉 System test verification passed: link

@strimzi strimzi deleted a comment from github-actions bot Oct 25, 2025
@strimzi strimzi deleted a comment from github-actions bot Oct 25, 2025
@strimzi strimzi deleted a comment from github-actions bot Oct 25, 2025
@strimzi strimzi deleted a comment from github-actions bot Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants