elotl / kip

Virtual-kubelet provider running pods in cloud instances
Apache License 2.0
223 stars 14 forks source link

updating pricing data for EC2 instances stopped working #237

Open hidalgopl opened 3 years ago

hidalgopl commented 3 years ago

KIP selects cheapest possible instance to satisfy resource spec of the pod. This is handled in instance selector package. Instance selector makes informed decision based on EC2 pricing data. EC2 pricing data is either:

  1. a json file in correct format mounted in container under the path specified as kip flag --instance-data-path.
  2. If flag is not set, if falls back to the data baked into binary.

Data baked in binary could be updated by running make update-pricing-data and commiting generated files into the repo. Unfortunately, everything mentioned above, implemented in #193 is no longer working. Public API that we used there, https://banzaicloud.com/cloudinfo/api/v1/ is no longer available.

We would like to keep current format of pricing data as well as two possible ways of providing the data (via the file or baked into binary). Ideally, we should use official AWS pricing API to get this data. We may try to use similar approach as the one taken in cluster-autoscaler aws provider

Bonus points if we can get info about instance type architecture (amd64/arm64) as this would allow us to get rid of maintaining static list of ARM64 instance families (check #234 ).