Disable CC network resource goals when resource capacities are not set.#11465
Disable CC network resource goals when resource capacities are not set.#11465scholzj merged 6 commits intostrimzi:mainfrom
Conversation
68ccb06 to
00f270d
Compare
967c662 to
222e049
Compare
scholzj
left a comment
There was a problem hiding this comment.
As I suggested in one of the comments. Resources are not configured in the Kafka CR anymore. It would be also good to understand what is the plan when some nodes have resources defined and some not. What will you do then?
Thanks for the catch (and review), we only want to consider the CPU capacity for a cluster to be considered to be properly configured for CPU-dependent Cruise Control goals if there is a capacity value explicitly configured for every broker whether through the general capacity or broker specific overrides, or the resource requirements. So if none of these are defined for a broker, including the resource requirement, we want to disable the CPU-dependent Cruise Control goals. I had wrongly assumed that all the node pools had their resources defined in the kafkaBrokerResources map, I have updated the logic to disable the CPU-dependent Cruise Control goals if there is a broker in the kafkaBrokerNodes set that doesn't have it's node pool (and resource requirements) defined in the kafkaBrokerResources map. |
scholzj
left a comment
There was a problem hiding this comment.
It seems to have quite a lot of changes given this now should be a pretty basic if-else thing. Should we split this into a refactoring PR and network goals PR? TBH, it is pretty hard to review what changes are really related to what.
You should probably also update the documentation to clarify the default goals?
Yeah that makes sense, just isolated the refactoring work into a different PR here [1] Once that is sorted, this PR will be a lot easier to review. [1] #11615 |
Signed-off-by: Kyle Liberti <kliberti.us@gmail.com>
17bc8e9 to
b67fe66
Compare
Signed-off-by: Kyle Liberti <kliberti.us@gmail.com>
scholzj
left a comment
There was a problem hiding this comment.
Few more nits, but mostly looking good.
Signed-off-by: Kyle Liberti <kliberti.us@gmail.com>
scholzj
left a comment
There was a problem hiding this comment.
One more nit. LGTM otherwise. Thanks.
Signed-off-by: Kyle Liberti <kliberti.us@gmail.com>
|
/azp run regression |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ppatierno
left a comment
There was a problem hiding this comment.
LGTM. Just a couple of nits.
Signed-off-by: Kyle Liberti <kliberti.us@gmail.com>
Signed-off-by: Kyle Liberti <kliberti.us@gmail.com>
|
@tinaselenge Do you have anything more on this? You had some comments on this PR in the past. Thanks. |
tinaselenge
left a comment
There was a problem hiding this comment.
Thanks for the changes. LGTM!
…t. (strimzi#11465) Signed-off-by: Kyle Liberti <kliberti.us@gmail.com>
Type of change
Description
This PR adds logic to the Strimzi Cluster Operator to remove network resource related Cruise Control goals from the
default.goalsandhard.goalslists by default if the capacity configurations for those resources are not explicitly set in the.spec.kafka.resourcesor.spec.cruiseControl.brokerCapacitysections of theKafkacustom resource. The following Cruise Control goals are affected:This will prevent users from balancing partitions based on network resources without defining capacities for those network resources in their
Kafkacustom resource.Addresses the issue raised here: #11409
(EDITED): Updated to reduce scope to focus on network-related goals.
Checklist
Please go through this checklist and make sure all applicable tasks have been done