-
Notifications
You must be signed in to change notification settings - Fork 440
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 docs for external-push scaler #193
Conversation
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
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 provide a link or some guidance on how to build one of these?
Yes, I'll put something together for that |
@ahmelsayed any updated on the guidance doc pls? |
Bump @ahmelsayed |
Sorry about the delay, I'll get it done this week. |
Signed-off-by: Ahmed ElSayed <ahmels@microsoft.com>
@tomkerkhove I added this guide. I tried to add a tabs shortcode like this one but using aplinejs instead of jquery, but after few hours I couldn't get it to work, so I just repurposed the component for FAQ. If someone knows alpinejs and hugo better than me, it would be nice to have the different languages in tabs rather than collapsible components, I think https://deploy-preview-193--keda.netlify.app/docs/2.0/concepts/external-scalers/ |
Signed-off-by: Ahmed ElSayed <ahmels@microsoft.com>
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, added a few suggestions.
Can we do the same for v1.5 & v1.4 or is it too much effort?
|
||
{{< collapsible "Golang" >}} | ||
|
||
Full implementation can be found here: https://github.com/ahmelsayed/external-scaler-samples |
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 donate this to kedacore
?
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.
yes, was just preparing the repo. Will move it there.
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 and also for the repo, very useful to have a reference as well!
``` | ||
|
||
The `Scaler` interface defines 4 methods: | ||
- `GetMetrics` and `GetMetricsSpecForScaling` that are used to build the HPA definition for that particular scaler. |
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.
What should we expect here? It's not fully clear to me.
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.
There is a bit more details about them in the "Implementing" sections
GetMetricSpec
returns the target value for the HPA definition for the scaler. This scaler will define a static target of 10, but the threshold value is often specified in the metadata for other scalers.
GetMetrics
returns the value of the metric refered to fromGetMetricSpec
, in this example it'searthquakeThreshold
. Refer to the HPA docs for how HPA calculatesreplicaCount
based on metric value and target value.
It's easier to explain with an example, but I can expand the description there a bit. how about
GetMetricSpec
returns the target value for the HPA definition for the scaler. For more details refer to ImplementingGetMetricSpec
GetMetrics
returns the value of the metric refered to fromGetMetricSpec
. For more details refer to ImplementingGetMetrics
?
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.
It helps a lot, thanks!
Examples are always welcome but not a must!
scalerAddress: external-scaler-service:8080 | ||
tlsCertFile: /path/to/tls/cert.pem # optional | ||
``` | ||
|
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 would add a link here maybe on how to write an external push scaler (concepts)?
Same goes for the external scaler.
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Signed-off-by: Ahmed ElSayed <ahmels@microsoft.com>
Signed-off-by: Ahmed ElSayed <ahmels@microsoft.com>
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.
Other than the current comments it looks good to me, thanks!
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Signed-off-by: Ahmed ElSayed <ahmels@microsoft.com>
I'll open other PRs for porting the guide to 1.5 and 1.4 |
Signed-off-by: Ahmed ElSayed ahmels@microsoft.com