autoscaler icon indicating copy to clipboard operation
autoscaler copied to clipboard

node-group-auto-discovery support for oci

Open gvnc opened this issue 1 year ago • 4 comments

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR provides oci support for node-group-auto-discovery parameter. ClusterAutoscaler will look for the nodepools in given compartment and match the nodepool tags. If tags are matched, the nodepool will be used for autoscaling. If tags do not match, nodepool will be ignored.

Which issue(s) this PR fixes:

Special notes for your reviewer:

This functionality was tested on OCI. Please find extended logs from the test.


I1016 10:02:11.736204       1 oci_manager.go:340] node group auto discovery spec constructed: &{manager:<nil> kubeClient:<nil> clusterId:ocid1.clusterinteg.oc1.phx.aaaaaaaagju3g2ukus57t4spw7u4fcmdiozwzgamnzq46fdozcv1234567 compartmentId:ocid1.compartment.oc1..aaaaaaaacciywjzae6gctocqzgiah6go4qay2phl2aoepwq6kv42xratkadq tags:map[foo:bar nmsp.ca-managed:true] minSize:1 maxSize:5}

W1016 10:02:12.921044       1 oci_manager.go:225] nodepool ignored as the tags do not satisfy the requirement : ocid1.nodepoolinteg.oc1.phx.aaaaaaaaunlcuncyrpqm7u6x6gw7ihycwkybiqddsug2wqrsinktn3dnllda , map[tag1:1234]

I1016 10:02:12.921103       1 oci_manager.go:223] auto discovered nodepool in compartment : ocid1.compartment.oc1..aaaaaaaacciywjzae6gctocqzgiah6go4qay2phl2aoepwq6kv42xratkadq , nodepoolid: ocid1.nodepoolinteg.oc1.phx.aaaaaaaaxq7iksc5y5hbpahfcdr3xjbif2mfzf7n45sbzec32nc2tlax4hza

W1016 10:02:12.921153       1 oci_manager.go:225] nodepool ignored as the  tags do not satisfy the requirement : ocid1.nodepoolinteg.oc1.phx.aaaaaaaahtj2m647kg7oqtb6rpeckaj7olvuyzl5kqejumbsmn2ly6w7rfbq , map[testTag:testValue]

Does this PR introduce a user-facing change?

Added OCI support for **node-group-auto-discovery** parameter. 

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [Usage]: The parameter should have a value in the pattern;
- `clusterId:<clusterId>,compartmentId:<compartmentId>,nodepoolTags:<tagKey1>=<tagValue1>&<tagKey2>=<tagValue2>,min:<min>,max:<max>`

gvnc avatar Oct 16 '24 11:10 gvnc

Hi @gvnc. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar Oct 16 '24 11:10 k8s-ci-robot

/ok-to-test

aleksandra-malinowska avatar Oct 16 '24 11:10 aleksandra-malinowska

OK. Changes look good to me. How about you @trungng92 ?

jlamillan avatar Oct 21 '24 22:10 jlamillan

Okay, new changes look good to me.

trungng92 avatar Oct 25 '24 16:10 trungng92

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gvnc, jlamillan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Oct 25 '24 20:10 k8s-ci-robot