GabrielCWT opened a new pull request, #18591: URL: https://github.com/apache/druid/pull/18591
### Description The aim of the PR is to enable changing `capacity` for the `KubernetesTaskRunner`. This would be done through the existing POST API `/druid/indexer/v1/k8s/taskrunner/executionconfig`. #### K8 configuration changes In order to do this, I have added a new interface `KubernetesTaskRunnerConfig` and renamed the existing config to `KubernetesTaskRunnerStaticConfig`. The interface will be implemented by the existing static config and a new `KubernetesTaskRunnerEffectiveConfig` which will be a wrapper class to encapsulate both the dynamic and static configs. The effective config will fall back to the static config's capacity if the dynamic config has not been set. #### Changes to `/druid/indexer/v1/k8s/taskrunner/executionconfig` behaviour The API will now take a new `capacity` field. On top of this, the fields will now be optional. If any field is `null` or not passed, we will use the existing dynamic config values. #### Release note New `capacity` field for `/druid/indexer/v1/k8s/taskrunner/executionconfig` POST API. It will change the capacity for `KubernetesTaskRunner`. ### Challenges In order to update the capacity for the task runner, I am calling a new function `syncCapacityWithDynamicConfig` before every task is run in order to update the thread pool to the newest config. The issue with this is that any changes by the user will not be immediately reflected on the web console's homepage under the "Tasks" widget. The "task slots" would only be updated after a new task has been run. I could not find a way to add a callback to the updating of dynamic configurations and felt that having a check every few seconds to see if the dynamic configuration had been updated was unnecessarily complex. I am open to suggestions if there are better ways to update the task runner. <img width="342" height="202" alt="Screenshot 2025-10-01 at 5 47 05 PM" src="https://github.com/user-attachments/assets/1476d5a0-ccae-4813-ac69-24244cf29737" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
