autoscaler/cluster-autoscaler/cloudprovider/digitalocean
Timo Reimann 05e2011096 digitalocean: support reading access token from file
This makes it possible to securely store the access token in a file and
load it into the cloud provider from there.

Document DigitalOcean's cloud config format while we are here.
2021-06-16 17:03:17 +02:00
..
testdata digitalocean: support reading access token from file 2021-06-16 17:03:17 +02:00
OWNERS Add MorrisLaw to list of approvers for DigitalOcean 2020-07-08 17:55:01 -04:00
README.md digitalocean: support reading access token from file 2021-06-16 17:03:17 +02:00
digitalocean_cloud_provider.go digitalocean: do not Refresh() on startup 2021-06-15 23:30:46 +02:00
digitalocean_cloud_provider_test.go digitalocean: do not Refresh() on startup 2021-06-15 23:30:46 +02:00
digitalocean_manager.go digitalocean: support reading access token from file 2021-06-16 17:03:17 +02:00
digitalocean_manager_test.go digitalocean: support reading access token from file 2021-06-16 17:03:17 +02:00
digitalocean_node_group.go Define interfaces for per NodeGroup config. 2021-01-25 11:00:16 +01:00
digitalocean_node_group_test.go fix digitalocean min size bug 2020-04-20 21:18:17 +00:00

README.md

Cluster Autoscaler for DigitalOcean

The cluster autoscaler for DigitalOcean scales worker nodes within any specified DigitalOcean Kubernetes cluster's node pool. This is part of the DOKS offering which can be enabled/disable dynamically for an existing cluster.

Configuration

Cloud config file

The (JSON) configuration file of the DigitalOcean cloud provider supports the following values:

  • cluster_id: the ID of the cluster (a UUID)
  • token: the DigitalOcean access token literally defined
  • token_file: a file path containing the DigitalOcean access token
  • url: the DigitalOcean URL (optional; defaults to https://api.digitalocean.com/)

Exactly one of token or token_file must be provided.

Behavior

Parameters of the autoscaler (such as whether it is on or off, and the minimum/maximum values) are configured through the public DOKS API and subsequently reflected by the node pool objects. The cloud provider periodically picks up the configuration from the API and adjusts the behavior accordingly.

Development

Make sure you're inside the root path of the autoscaler repository

1.) Build the cluster-autoscaler binary:

make build-in-docker

2.) Build the docker image:

docker build -t digitalocean/cluster-autoscaler:dev .

3.) Push the docker image to Docker hub:

docker push digitalocean/cluster-autoscaler:dev