AnykeyNL / OCI-AutoScale

Automatic Scaling for OCI BM Database Cloud Service (Schedule based)
Universal Permissive License v1.0
112 stars 64 forks source link

Scope down search function results #28

Closed flynnkc closed 1 year ago

flynnkc commented 1 year ago

I manage a large tenancy with thousands of objects in a region. The AutoScale script was not able to scale due to the search results maxing out with resources that are not supported. Modifying the query to only search for resources that are known to scale fixed the issue. In addition, the logs are much cleaner without having to go through every VCN in a region.

Added a Dockerfile and requirements.txt as I run the script as a cronjob on Kubernetes, and it's easy enough to build an image to run the script.

When I tried to test the script in Cloud Shell, it errored out on 'os' being unknown in the OCIFunctions.py file. Imported 'os' and it began working again.