Implement node group TemplateNodeInfo method#22
Implement node group TemplateNodeInfo method#22visdmin wants to merge 13 commits intoUpCloudLtd:feat/cluster-autoscaler-cloudprovider-upcloudfrom
Conversation
Revert to UpC GO API v6.15.0
|
Hi, First time contributor here ! I was told that you are very busy right now and pull request review times could be very long, but I don't mind. |
|
Would love to see this merged |
Hi @Pionerd, if you are interested in testing these features please let me know. Of course this version of the UpC cluster auto-scaler should not be used in any production environment, only after the changes have been audited and merged. I have been using this version in my development and testing environments with stable results. |
|
Sure, if you supply me with an image or instructions how to build it, I'll test it out. In prod ;-) |
Hi @Pionerd, sorry for the huge delay. I built the image for you: docker pull ghcr.io/visdmin/autoscaler:v1.31.0-alpha1Tips for usage:You need to have at least 1 node group with minimum node group > 0 (1), this is to ensure that autoscaler does not scale down all your worker nodes (and you do not end up with cluster that has 0 worker nodes). Configuration example apiVersion: apps/v1
kind: Deployment
metadata:
name: cluster-autoscaler
....
containers:
- name: cluster-autoscaler
image: ghcr.io/visdmin/autoscaler:v1.31.0-alpha1
imagePullPolicy: "Always"
command:
- /cluster-autoscaler
- --cloud-provider=upcloud
- --stderrthreshold=info
- --scale-down-enabled=true
- --v=4
- --nodes=3:3:nodegroup-1
- --nodes=0:3:nodegroup-2
.....You can also utilized UpCloud worker node group labels and taints to control what workloads are scheduled on the worker node groups that are controller by the cluster autoscaler. Currently you cannot create UpCloud worker node group with taints using the hub UI, but you can create one with taints via the API. |
What type of PR is this?
/kind feature
What this PR does:
Add support for node groups with
MinSize: 0service/cloud.goplan.goprice.gotimezone.gozone.go(required byservice/cloud.go)Fetch all plans (api does not seem to have filtering support) and find the matching plan details for the group plan.
upCloudNodeGroupthere are used by the node groupTemplateNodeInfomethodTemplateNodeInfomethodnodeGroupMinSize1->0nodeMaxPods110NodeInforeturned byTemplateNodeInfoof empty node groupMinSize: 0SupportScaleToZero: trueMinSize: 0is valid and allowed when at least one other node group exists withMinSize >= 1.Why we need it:
Enables great cost and environmental saving opportunities for UKS users.
Special notes for your reviewer:
MinSize: 0is only allowed when at least one node group withMinSize >= 1existsThis is because the UpC cluster auto-scaler is not running inside control plane.
NodeInforeturned byTemplateNodeInfois very likely incomplete.TemplateNodeInfocurrently returnscloudprovider.ErrNotImplementedwhen group size is> 0, this may be against conventions ? (but preserves old behaviour for node groups that have node)NodeGroupSpec.SupportScaleToZeroshould treated:This property was previously set to
falseby using constantnodeGroupMinSize (1)this constant has been changed to0and therefore theNodeGroupSpec.SupportScaleToZerois always set totrue. Technically UKS node groups support scaling to 0. Author is just bit confused if theNodeGroupSpec.SupportScaleToZeroshould be set tofalsefor node groups that haveMinSize >= 1vendor.sh github.com/upcloudltd/upcloud-go-api/v6/ v6.5.0Does this PR introduce a user-facing change?