Skip to content

Store CA generation in Ca class #11277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 3, 2025

Conversation

katheris
Copy link
Contributor

Type of change

  • Refactoring

Description

Refactoring CA generation methods in Ca class:

  • Store CA generation directly in Ca class
  • Simplify getter methods
  • Remove duplicate methods from ReconcilerUtils

This change stores the CA generation in a variable, rather than relying on the generation inside the Secret class. This will help with future refactoring for cert-manager integration that will remove the direct use of the Secret in this class. It also simplifies the code, making it easier to follow.

Finally there was a duplicate method in ReconcilerUtils for determining if the CA generation changed, so this method has been removed and the code updated to use the method in the Ca class.

Checklist

Please go through this checklist and make sure all applicable tasks have been done

  • Write tests
  • Make sure all tests pass
  • Update documentation
  • Check RBAC rights for Kubernetes / OpenShift roles
  • Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally
  • Reference relevant issue(s) and close them after merging
  • Update CHANGELOG.md
  • Supply screenshots for visual changes, such as Grafana dashboards

@katheris katheris added this to the 0.46.0 milestone Mar 20, 2025
@katheris
Copy link
Contributor Author

/azp run regression

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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

* Store CA generation directly in Ca class
* Simplify getter methods
* Remove duplicate methods from ReconcilerUtils

Signed-off-by: Katherine Stanley <[email protected]>
@katheris katheris force-pushed the refactorCaGenerationMethods branch from 46e3d17 to 8a90ba5 Compare March 24, 2025 11:46
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

@katheris
Copy link
Contributor Author

Thanks for the reviews everyone, I'm actually going to mark this as [Do Not Merge] as I'm working on a follow up refactor and want to make sure that these changes fully work with the follow up PR before merging.

@katheris katheris changed the title Store CA generation in Ca class [DO NOT MERGE] Store CA generation in Ca class Mar 24, 2025
@katheris katheris changed the title [DO NOT MERGE] Store CA generation in Ca class Store CA generation in Ca class Mar 27, 2025
@katheris
Copy link
Contributor Author

@ppatierno @tinaselenge @im-konge I've pushed a commit with a couple of small changes to better align this with a future refactor I will need to do. Please take another look when you get time

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. Good refactoring!

@katheris katheris merged commit 334096f into strimzi:main Apr 3, 2025
13 checks passed
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.

4 participants