Skip to content

Conversation

@scholzj
Copy link
Member

@scholzj scholzj commented Feb 10, 2026

Type of change

  • Bugfix

Description

This PR continues on the work from #12390 and makes sure the CA chain is added during the upgrade of the operator. That makes sure that after the upgrade to Strimzi 0.51.0, the CA chain is added for existing clusters and not only for new ones.

Given the certificates are stored as byte arrays and the CA chain is at the end, the comparing is not completely straightforward. But hopefully I made it sufficiently simple and readable. After some time - once we are sure that everyone upgraded away from 0.48-0.50 - we should be able to remove this logic again.

(It also does minor refactoring of the maybeCopyOrGenerateCerts method to avoid the negative if nd make the code a bit more readable)

This should (hopefully) resolve #12364

Checklist

  • Write tests
  • Make sure all tests pass
  • 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 force-pushed the update-secrets-when-CA-chain-is-missing branch from 5e9efb8 to aa36cee Compare February 10, 2026 20:26
@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.00%. Comparing base (1b5fe72) to head (4d59304).

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #12403      +/-   ##
============================================
- Coverage     75.02%   75.00%   -0.02%     
- Complexity     6660     6663       +3     
============================================
  Files           373      373              
  Lines         25385    25390       +5     
  Branches       3411     3412       +1     
============================================
- Hits          19044    19043       -1     
- Misses         4954     4957       +3     
- Partials       1387     1390       +3     
Files with missing lines Coverage Δ
...a/io/strimzi/operator/cluster/model/ClusterCa.java 91.22% <100.00%> (+0.40%) ⬆️

... and 3 files 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 Feb 10, 2026

/gha run pipeline=upgrade,regression

@github-actions
Copy link

github-actions bot commented Feb 10, 2026

⏳ System test verification started: link

The following 10 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)
  • upgrade-azp_kraft_upgrade-amd64 (oracle-vm-4cpu-16gb-x86-64)
  • upgrade-azp_kafka_upgrade-amd64 (oracle-vm-4cpu-16gb-x86-64)
  • upgrade-azp_kraft_upgrade-arm64 (oracle-vm-4cpu-16gb-arm64)
  • upgrade-azp_kafka_upgrade-arm64 (oracle-vm-4cpu-16gb-arm64)

Tests will start after successful build completion.

@github-actions
Copy link

🎉 System test verification passed: link

// For more details, see https://github.com/strimzi/strimzi-kafka-operator/issues/12364.
//
// After some time - after multiple Strimzi releases, once the CA chains are added in all clusters, we
// should be able to remove this logic again.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we have an issue open for this and referring to it in this comment? wdyt?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to open one if it is approved.

Signed-off-by: Jakub Scholz <[email protected]>
Copy link
Contributor

@tinaselenge tinaselenge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Jakub.

Copy link
Member

@ppatierno ppatierno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants