Comments (5)
Ah OK, thanks for the feedback, helpful to hear a use case. So the way the current code works is if the current replica count is 0
scaling is disabled on the resource, so a resource can be scaled down to 0
replicas, but it cannot be scaled again after it has been set to 0
. In your use case you need to be able to scale down to 0
and then afterwards scale upwards from 0
- is that right?
It seems reasonable to me, I think the way to do this would be to have a boolean configuration option allowScaleFromZero
, if this is true
you can scale upwards from 0
, if it is false
you can't scale upwards from 0
- would that be suitable for you? If so I'll add in that flag and get it in a new release (v0.12.0
), thanks for finding that!
from custom-pod-autoscaler.
Yup, that's exactly right. I'm curious about the use case of 0
being disabled? Seems like a label on the deployment might be cleaner to mark it as 'autoscale disabled' might be cleaner?
from custom-pod-autoscaler.
Hmm that's a good point, I'm not sure if there actually is a use case for disabling autoscaling, I was basing it off the Horizontal Pod Autoscaler's behaviour:
But I think I implemented this incorrectly, autoscaling here is only disabled if minReplicas is > 0
so behaviour should be the same as you have laid out, if minReplicas is set to 0
scaling down to and up from 0
should be allowed - I think this is better.
from custom-pod-autoscaler.
I think the HPA behavior might have changed when they added the ability to scale to zero.
Thanks!
from custom-pod-autoscaler.
This is now available in version v0.12.0
, there's an example here and some documentation here.
Hope that helps with your use case!
from custom-pod-autoscaler.
Related Issues (20)
- Custom Pod Autoscaler version should be printed to the log on startup
- The pre-scaling hook should be run after the downscale stabilisation calculation
- invalid character 'c' looking for beginning of value HOT 2
- Improve error logging around JSON parsing HOT 1
- Cannot Access Costumed Metrics in CPA HOT 4
- [Question] Logging in examples HOT 1
- Metrics gathered for more than 1 statefulsets are not in correct order HOT 5
- Create a Java/SpringBoot example
- Support Argo Rollouts HOT 3
- Add context to error messages
- "per-resource" run mode queries kubernetes metrics with wrong labelSelector HOT 2
- Support operators (CRD based custom controllers) HOT 1
- Can't use go install due to replace directives in go.mod HOT 2
- Client Certificate Support HOT 6
- Enrich CPA Custom Resource object with status, events, annotations for the scaling decisions
- Refactor to use jthomperoo/k8shorizmetrics for K8s metric gathering
- Target multiple deployments in one custom auto scaler HOT 1
- Add step to edit pod annotation controller.kubernetes.io/pod-deletion-cost before scaling. HOT 3
- Node example
- Metrics with type http brings the whole deployment config as query HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from custom-pod-autoscaler.