Skip to content
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

Clarification of CA Rancher Provider capabilities #7148

Open
jDmacD opened this issue Aug 8, 2024 · 10 comments · May be fixed by #7405
Open

Clarification of CA Rancher Provider capabilities #7148

jDmacD opened this issue Aug 8, 2024 · 10 comments · May be fixed by #7405
Labels
area/cluster-autoscaler area/provider/rancher kind/feature Categorizes issue or PR as related to a new feature.

Comments

@jDmacD
Copy link

jDmacD commented Aug 8, 2024

Which component are you using?:

CA Rancher Provider

Is your feature request designed to solve a problem? If so describe the problem this feature should solve.:

The documentation for the Rancher Provider states, emphasis mine:

This cluster autoscaler for Rancher scales nodes in clusters which use RKE2 provisioning (Rancher v2.6+). It uses a combination of the Rancher API and the underlying cluster-api types of RKE2.

The cluster-autoscaler can be run inside the RKE2 cluster, on the Rancher server cluster or on a completely separate machine. To run it outside the RKE2 cluster, make sure to provide a kubeconfig with --kubeconfig.

My reading of this is that CA can be deployed to a Rancher server in order to scale RKE2 clusters that Rancher creates. But the example cloud-config implies that only a single RKE2 cluster can be targeted for scaling using clusterName and clusterNamespace

# rancher server credentials
url: https://rancher.example.org
token: <rancher token>
# name and namespace of the clusters.provisioning.cattle.io resource on the
# rancher server
clusterName: my-cluster
clusterNamespace: fleet-default
# optional, will be auto-discovered if not specified
#clusterAPIVersion: v1alpha4

There is no mention of any autodiscovery capabilities or configuration for the Rancher Provider, even though it seems to share some similarities to the CAPI Provider.

Describe the solution you'd like.:

  • Clarification in the documentation stating that either
    a. The Rancher Provider can only scale a single cluster
    b. The Rancher Provider can scale multiple clusters
    • Documentation on how this is achieved.
  • More specificity in the example cloud-config. For example clusterName: rancher-server-cluster or clusterName: rke2-cluster.

Describe any alternative solutions you've considered.:

Additional context.:

@jDmacD jDmacD added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 8, 2024
@jDmacD jDmacD changed the title Clarification of AC Rancher Provider capabilities Clarification of CA Rancher Provider capabilities Aug 8, 2024
@Shubham82
Copy link
Contributor

/area provider/rancher
/area cluster-autoscaler

@Shubham82
Copy link
Contributor

Shubham82 commented Aug 9, 2024

cc @ctrox (PTAL!)

@ctrox
Copy link
Contributor

ctrox commented Aug 13, 2024

My reading of this is that CA can be deployed to a Rancher server in order to scale RKE2 clusters that Rancher creates. But the example cloud-config implies that only a single RKE2 cluster can be targeted for scaling using clusterName and clusterNamespace

I think cluster-autoscaler in general does not support targeting multiple workload clusters with a single instance. The API for the different cloud-providers is limited in that it targets a single workload cluster.

There is no mention of any autodiscovery capabilities or configuration for the Rancher Provider, even though it seems to share some similarities to the CAPI Provider.

I agree that it could be made a bit more clear in the docs making it clear that only a single workload cluster can be targeted. The current cloud-config example states:

# name and namespace of the clusters.provisioning.cattle.io resource on the rancher server

The clusters.provisioning.cattle.io is the CRD Rancher uses to manage RKE2 clusters but yeah this might not be obvious to all Rancher users.

@jDmacD
Copy link
Author

jDmacD commented Aug 13, 2024

Awesome, thanks for the clarification @ctrox. Its a shame there is not more information on using the autoscaler in the Suse/Rancher docs. You would think this is something they would put front and center. I know they have an AWS example, it would be nice if they expanded the docs to cover the other platforms they support.

Thank you for creating and maintaining the Rancher Provider and answering my question.

@Shubham82
Copy link
Contributor

Hi @jDmacD, if your concern is resolved, so can we close this issue?

@diegonayalazo
Copy link

Hi everyone! Is it possible to have more examples on how to setup the RKE2 cluster in order for the autoscaler to work? How can I be of help?

@Shubham82
Copy link
Contributor

Hi everyone! Is it possible to have more examples on how to setup the RKE2 cluster in order for the autoscaler to work? How can I be of help?

IMO, it would be helpful for users to have more examples of how we can use CA with Rancher RKE2.

you can propose a PR if you have any examples like that.

Let's wait for others opinion.

@Shubham82
Copy link
Contributor

cc @ctrox
WDYT?

@ctrox ctrox linked a pull request Oct 16, 2024 that will close this issue
@ctrox
Copy link
Contributor

ctrox commented Oct 16, 2024

@diegonayalazo already opened a PR that improves the example config (#7266), I just created #7405 to address what the issue originally asked about. Other than that I'm not sure what else can be done as there aren't really any other config options and the few fields that we have should hopefully be clear after these PRs are merged.

@Shubham82
Copy link
Contributor

Hi @ctrox, Thanks for the above information, I thought @diegonayalazo was asking for adding example (another than the existing) for Rancher RKE2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cluster-autoscaler area/provider/rancher kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants