-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support for autoscaling/v2-based HorizontalPodAutoscaler on Kubernetes v1.23+ #2462
Comments
In this case, what approach are we going to follow? Supporting both depending on the cluster? |
Based on the Kubernetes version it is installed on I'd try to use the latest |
We should plan for this as https://kubernetes.io/blog/2022/04/07/upcoming-changes-in-kubernetes-1-24/#looking-ahead |
Hi, |
This changed is applied in the KEDA operator code and how it creates the HPA. From ArgoCD pov, you shouldn't see any change because the generated HPA isn't managed by ArgoCD. |
well i jusr want the updated schema...i thought i can get a updated schema for V2 |
What do you mean? autoscaling/v2 schema? I don't get your question, sorry |
yes i mean that ...its probably working now..though the memory is not correctly getting fetched by metrics need to check on that...argocd is syncing every 5 secs due to autoscaling.... thanks anyway |
I still don't get you, sorry. What problem are you seeing? Could you describe it? |
@JorTurFer well sure let me try |
Do you mean an ScaledObject with CPU/Memroy trigger or just an HPA directly? We also use ArgoCD and I haven't seen this behavior, could you share your ScaledObject to replicate it in my local? What ArcoCD version are you using? |
@JorTurFer The argocd version is 2.7 aks is 1.25.6 and i have used the below manifest file {{- if .Values.autoscaling.enabled }}
and in the values yaml file provided the below value |
But, is that related with KEDA somehow? I mean, that's an HPA and KEDA doesn't manage it, KEDA generates its own HPAs for ScaledObjects, but the cpu and memory metrics are served by the k8s metrics server, not by KEDA |
@JorTurFer well i added it only after i saw that argocd is syncing every 5 sec else it was pretty straight forward without behavior block...did you try on your local with both cpu and memory? |
Do you have any link about that? I thought that the HPA Controller has a fixed period :)
No, we use
Based on your manifest, the HPA controller won't scale out/in more than once each 300 seconds, I don't think that's the reason behind the syncing tbh. Do you have autosync enabled? |
well i dont have it handy i merged my code with just cpu and new api version n schema next sprint will start again hunting this
whats nats?? you told you have argocd so you dont see this sync issue? downscale also seems to be not working correctly
yes we do have autosync enabled which retries every 5 sec....but y it happens when i include memory+cpu and not with cpu only |
Hi, If you have autosync every 5 seconds, maybe there is something modifying your workload automatically and ArgoCD is trying to reconcile it but IDK what can be as the only manifest that you have sent is for an HPA and KEDA doesn't accept HPAs (so I'm not sure how is your problem related with this issue or with KEDA, that's the thing that I'm trying to figure out 😄 ) I'd suggest disabling the autosync for a while and check which differences are detected by ArgoCD. I mean, if you don't autosync the |
ok thanks for the hint..have a good day |
Proposal
HPA has graduated to GA and we should use
autoscaling/v2
for all the HPAs that we create on Kubernetes v1.23+.https://kubernetes.io/blog/2021/12/07/kubernetes-1-23-release-announcement/#horizontalpodautoscaler-v2-graduates-to-ga
Use-Case
Provide alignment with Kubernetes upstream.
Anything else?
No response
The text was updated successfully, but these errors were encountered: