-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add Quotas API to Kafka CR and upgrade Strimzi Quotas Plugin to 0.3.1 #9895
Conversation
692d830
to
97aa69f
Compare
97aa69f
to
3b5d419
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also go through the PR checklist to see what to do as part of the Pr such as update the CHANGELOG. You should also at least remove the old invalid docs from the documentation.
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPlugin.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPluginKafka.java
Outdated
Show resolved
Hide resolved
...perator/src/main/java/io/strimzi/operator/cluster/model/KafkaBrokerConfigurationBuilder.java
Outdated
Show resolved
Hide resolved
...perator/src/main/java/io/strimzi/operator/cluster/model/KafkaBrokerConfigurationBuilder.java
Outdated
Show resolved
Hide resolved
...erator/src/main/java/io/strimzi/operator/cluster/model/quotas/QuotasPluginConfiguration.java
Outdated
Show resolved
Hide resolved
cluster-operator/src/main/java/io/strimzi/operator/cluster/model/quotas/QuotasPluginUtils.java
Outdated
Show resolved
Hide resolved
...er-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/KafkaReconciler.java
Outdated
Show resolved
Hide resolved
...er-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/KafkaReconciler.java
Outdated
Show resolved
Hide resolved
...er-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/KafkaReconciler.java
Outdated
Show resolved
Hide resolved
...er-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/KafkaReconciler.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPluginStrimzi.java
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPluginStrimzi.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPluginStrimzi.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @im-konge, thanks for working on this. Left some comments.
Once this PR is merged, I think we need to also remove this warning.
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPlugin.java
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPluginKafka.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPluginStrimzi.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPluginStrimzi.java
Outdated
Show resolved
Hide resolved
...perator/src/main/java/io/strimzi/operator/cluster/model/KafkaBrokerConfigurationBuilder.java
Show resolved
Hide resolved
...tor/src/test/java/io/strimzi/operator/cluster/model/KafkaBrokerConfigurationBuilderTest.java
Outdated
Show resolved
Hide resolved
...er-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/KafkaReconciler.java
Outdated
Show resolved
Hide resolved
...er-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/KafkaReconciler.java
Outdated
Show resolved
Hide resolved
cluster-operator/src/main/java/io/strimzi/operator/cluster/model/KafkaCluster.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! I left a couple of suggestions.
As discussed, there will be related doc that needs updating, but should probably be left to a separate pr.
api/src/main/java/io/strimzi/api/kafka/model/kafka/KafkaClusterSpec.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPluginKafka.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPluginStrimzi.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPluginStrimzi.java
Outdated
Show resolved
Hide resolved
@PaulRMellor thanks for reviewing the descriptions, I updated the section mentioning Kafka Static Quota plugin, to match the 0.3.0 version + the API changes. Could you please review that as well? Thanks! (I can create a follow-up docs PR that will mention the default user quotas, I just wanted to update in this one the parts that will not be correct after this change) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Great work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
additional changes look good. Just a couple of suggestions
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPlugin.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPluginStrimzi.java
Outdated
Show resolved
Hide resolved
...perator/src/main/java/io/strimzi/operator/cluster/model/KafkaBrokerConfigurationBuilder.java
Outdated
Show resolved
Hide resolved
cluster-operator/src/main/java/io/strimzi/operator/cluster/model/KafkaCluster.java
Outdated
Show resolved
Hide resolved
...-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/QuotasPluginUtils.java
Outdated
Show resolved
Hide resolved
...er-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/KafkaReconciler.java
Outdated
Show resolved
Hide resolved
...-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/QuotasPluginUtils.java
Outdated
Show resolved
Hide resolved
...er-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/KafkaReconciler.java
Outdated
Show resolved
Hide resolved
cluster-operator/src/test/java/io/strimzi/operator/cluster/ResourceUtils.java
Outdated
Show resolved
Hide resolved
e5ab858
to
acac770
Compare
@scholzj @ppatierno the PR is updated with the new version of Strimzi Quotas plugin (0.3.1), the comments should be now resolved and I updated also the ST for the quotas plugin, to reflect the changes from this PR. When you have time, could you please have another look? Thanks :) |
api/src/main/java/io/strimzi/api/kafka/model/kafka/KafkaClusterSpec.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPluginStrimzi.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPluginStrimzi.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManager.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManager.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManager.java
Outdated
Show resolved
Hide resolved
cluster-operator/src/test/java/io/strimzi/operator/cluster/ResourceUtils.java
Outdated
Show resolved
Hide resolved
...tor/src/test/java/io/strimzi/operator/cluster/model/KafkaBrokerConfigurationBuilderTest.java
Show resolved
Hide resolved
...perator/src/main/java/io/strimzi/operator/cluster/model/KafkaBrokerConfigurationBuilder.java
Show resolved
Hide resolved
cluster-operator/src/main/java/io/strimzi/operator/cluster/model/KafkaCluster.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManager.java
Outdated
Show resolved
Hide resolved
...er-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/KafkaReconciler.java
Show resolved
Hide resolved
e5e2b2f
to
0cdebe4
Compare
cluster-operator/src/main/java/io/strimzi/operator/cluster/model/KafkaCluster.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManager.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManager.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManager.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManager.java
Outdated
Show resolved
Hide resolved
...c/test/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManagerTest.java
Outdated
Show resolved
Hide resolved
...c/test/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManagerTest.java
Outdated
Show resolved
Hide resolved
...c/test/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManagerTest.java
Outdated
Show resolved
Hide resolved
...c/test/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManagerTest.java
Show resolved
Hide resolved
...va/io/strimzi/operator/cluster/operator/resource/events/KubernetesRestartEventsMockTest.java
Outdated
Show resolved
Hide resolved
97f6b20
to
c182dfb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more nits.
cluster-operator/src/main/java/io/strimzi/operator/cluster/model/KafkaCluster.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManager.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManager.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManager.java
Show resolved
Hide resolved
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManager.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManager.java
Show resolved
Hide resolved
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManager.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManager.java
Show resolved
Hide resolved
...c/test/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManagerTest.java
Outdated
Show resolved
Hide resolved
...c/test/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManagerTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @im-konge -- I re-reviewed the docs and left a few suggestions, including one about use of users and clients. We may want to be consistent there.
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPluginStrimzi.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPluginStrimzi.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/strimzi/api/kafka/model/kafka/quotas/QuotasPluginStrimzi.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Lukas Kral <[email protected]> fixups and tests Signed-off-by: Lukas Kral <[email protected]> few more changes, comments, changes to the QuotasST Signed-off-by: Lukas Kral <[email protected]> add one more check and OneOf to the Strimzi quota plugin fields Signed-off-by: Lukas Kral <[email protected]> changes after rebase Signed-off-by: Lukas Kral <[email protected]> comments Signed-off-by: Lukas Kral <[email protected]> crd install Signed-off-by: Lukas Kral <[email protected]> fix spotbugs Signed-off-by: Lukas Kral <[email protected]> fix tests Signed-off-by: Lukas Kral <[email protected]> update documentation, fix more tests, and apply comments from Paul Signed-off-by: Lukas Kral <[email protected]> comments Signed-off-by: Lukas Kral <[email protected]> excluded principals Signed-off-by: Lukas Kral <[email protected]> bump quotas plugin to 0.3.1 and do changes to code Signed-off-by: Lukas Kral <[email protected]> fix UT and update ST for the quotas plugin Signed-off-by: Lukas Kral <[email protected]> Jakub's and Paolo's comments Signed-off-by: Lukas Kral <[email protected]> remove blank lines in the config builder Signed-off-by: Lukas Kral <[email protected]> handle situation when we fail to create admin client Signed-off-by: Lukas Kral <[email protected]> comments from Jakub Signed-off-by: Lukas Kral <[email protected]> Jakub's comments Signed-off-by: Lukas Kral <[email protected]> Jakub's and Paul's comments Signed-off-by: Lukas Kral <[email protected]>
c182dfb
to
4e69ada
Compare
Signed-off-by: Lukas Kral <[email protected]>
cluster-operator/src/main/java/io/strimzi/operator/cluster/model/KafkaCluster.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManager.java
Outdated
Show resolved
Hide resolved
...c/test/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManagerTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Lukas Kral <[email protected]>
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I double checked ST part and LGTM.
@strimzi-ci run tests --cluster-type=ocp --cluster-version=4.15 --install-type=bundle --profile=all --groups=quotasplugin --build-images |
|
/azp run kraft-regression |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just a couple of nits.
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/DefaultKafkaQuotasManager.java
Outdated
Show resolved
Hide resolved
|
✔️ Test Summary ✔️TEST_PROFILE: all |
Signed-off-by: Lukas Kral <[email protected]>
/azp run upgrade |
Azure Pipelines successfully started running 1 pipeline(s). |
Type of change
Description
This PR adds Quotas API to Kafka CR based on Quotas management proposal and updates Strimzi Quotas Plugin version to 0.3.1 (and also it reflects changes based on Cluster Wide Volume Usage Quota Management).
It also changes the
QuotasST
, which need to reflect changes done in Strimzi Quotas Plugin 0.3.1.Closes #9097, #9859
Checklist
Please go through this checklist and make sure all applicable tasks have been done