Skip to content
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

StrimziKafkaCluster builder #86

Merged
merged 5 commits into from
Oct 15, 2024
Merged

Conversation

see-quick
Copy link
Member

@see-quick see-quick commented Oct 14, 2024

This PR adds flexibility to StrimziKafkaCluster by adapting the Builder pattern. With such change we will easily extend such class adding more parameters. Solves #84.

Signed-off-by: see-quick <maros.orsak159@gmail.com>
Signed-off-by: see-quick <maros.orsak159@gmail.com>
@see-quick see-quick added the enhancement New feature or request label Oct 14, 2024
@see-quick see-quick added this to the 0.108.0 milestone Oct 14, 2024
@see-quick see-quick requested review from scholzj and a team October 14, 2024 12:03
@see-quick see-quick self-assigned this Oct 14, 2024
@see-quick see-quick linked an issue Oct 14, 2024 that may be closed by this pull request
Copy link
Member

@scholzj scholzj left a comment

Choose a reason for hiding this comment

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

I think the builder pattern is useful. But by removing the original constructors, you are breaking the compatibility. Is that wise / intended? Should we keep them in some way?

@see-quick
Copy link
Member Author

see-quick commented Oct 14, 2024

I think the builder pattern is useful. But by removing the original constructors, you are breaking the compatibility. Is that wise / intended? Should we keep them in some way?

Hmmm, I was thinking about it, but adding more constructors would result in a lot of unnecessary code. Maybe a less aggressive approach would be to have both (but @Deprecate constructors)?

@scholzj
Copy link
Member

scholzj commented Oct 14, 2024

I think deprecating them would be fine. The question is if you can combine both the deprecated constructors and the builders to allow users to transition smoothly.

@see-quick
Copy link
Member Author

I think deprecating them would be fine. The question is if you can combine both the deprecated constructors and the builders to allow users to transition smoothly.

Yeah, it would be okay I think. It would be a matter of extracting the same code into methods so we don't end up with repetitive code. I will update this PR ten :)

Signed-off-by: see-quick <maros.orsak159@gmail.com>
Signed-off-by: see-quick <maros.orsak159@gmail.com>
Signed-off-by: see-quick <maros.orsak159@gmail.com>
Copy link
Member

@scholzj scholzj left a comment

Choose a reason for hiding this comment

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

Thanks.

@see-quick see-quick merged commit f981d57 into main Oct 15, 2024
7 checks passed
@see-quick see-quick deleted the strimzi-kafka-cluster-builder branch October 15, 2024 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve StrimziKafkaCluster class to use of Builder pattern
2 participants