-
Notifications
You must be signed in to change notification settings - Fork 180
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
Adding worker autoscaling support with KEDA #277
base: main
Are you sure you want to change the base?
Conversation
For some reason, the @nineinchnick I am open to suggestions for a better metric or testing strategy. |
35dc778
to
b9dcd3b
Compare
52c79e9
to
757de90
Compare
I found the I am also wondering if the Chart should support the creation of |
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.
First pass, I haven't yet checked all the new properties.
charts/trino/values.yaml
Outdated
@@ -114,6 +114,70 @@ server: | |||
# selectPolicy: Max | |||
# ``` | |||
|
|||
# -- Configure [KEDA](https://keda.sh/) for workers. |
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.
We should document this is exclusive with server.autoscaling
, and if possible, help users make the choice, if they're just starting with autoscaling and don't know either one of those options.
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.
This makes totally sense. I will improve the documentation on this.
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 tried to clarify this in the documentation. I also added a warning in NOTES.txt to indicate that keda would take precedente over hpa in case they are both enabled.
757de90
to
d20836f
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.
Are there any other popular autoscalers for Kubernetes? I see this just creates the ScaledObject
resource. What's the value in including this in the Trino chart? How hard is to manage this as an add-on, for example using an umbrella chart?
@@ -42,7 +42,12 @@ spec: | |||
- --password | |||
{{- end }} | |||
- --debug | |||
{{- if .Values.server.keda.enabled }} | |||
{{/* When testing KEDA we need a query that requires workers to run. */}} |
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.
Can we always use that query?
enabled: false | ||
pollingInterval: 30 | ||
# -- Period to wait after the last trigger reported active before scaling the resource back to 0 | ||
cooldownPeriod: 300 |
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.
Nit - would be nice to known the unit. I was about to suggest including seconds
in the property name, but I see it's consitent with Keda's API, so just mention that in the comment.
@@ -50,7 +50,7 @@ data: | |||
|
|||
config.properties: | | |||
coordinator=true | |||
{{- if gt (int .Values.server.workers) 0 }} | |||
{{- if or .Values.server.keda.enabled (gt (int .Values.server.workers) 0) }} |
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.
This should not depend on Keda, but have an explicit property.
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.
Could you elaborate a bit more on your comment?
My reasoning was that you need to set this property if you have more than 0 workers or if you are using KEDA (and you could have the minimum number of workers set to 0 in this case).
@@ -1,4 +1,4 @@ | |||
{{- if .Values.server.autoscaling.enabled -}} | |||
{{- if and .Values.server.autoscaling.enabled (not .Values.server.keda.enabled) -}} |
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.
Isn't Values.server.autoscaling.enabled
exclusive with .Values.server.keda.enabled
?
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 just added a warning telling the user that KEDA will override HPA. I have seen this solution in other charts (KEDA superseding classic HPA). Maybe it is better to avoid confusion and fail with an explicit error message if both are enabled? Now that I think about it, it makes more sense to just fail
since we are not re-using properties of .Values.server.autoscaling
in .Values.server.keda
.
I am not aware of other open-source Kubernetes autoscalers for Pods/Jobs.
KEDA allows for scaling worker Pods down to zero replicas when the cluster is unused, and to me this is a pretty interesting feature that cannot be achieved with vanilla HPA.
It is definitely doable, I am currently managing it with Kustomize and ArgoCD. One pain point in having to do this outside of the Chart is that I cannot remove the |
No description provided.