Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Events: get spot price from bid-advisor #69

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

vgunapati
Copy link
Collaborator

@vgunapati vgunapati commented Jun 4, 2020

Fixes #71

We will get the latest price from bid-advisor to avoid stale ASG spot price,

Problem:

When we are already running spot, if we switch instance type on ASG the events are still getting old instance type spot price

Before: ( Switch m5.xl to m5.2xl )

13m         Normal   SpotRecommendationGiven   spotpriceinfo/eks-vgu-k8s-instance-manager-nodes   {"apiVersion":"v1alpha1","spotPrice":"0.192", "useSpot": true}
8m          Normal   SpotRecommendationGiven   spotpriceinfo/eks-vgu-k8s-instance-manager-nodes   {"apiVersion":"v1alpha1","spotPrice":"0.192", "useSpot": true}
2m59s       Normal   SpotRecommendationGiven   spotpriceinfo/eks-vgu-k8s-instance-manager-nodes   {"apiVersion":"v1alpha1","spotPrice":"0.192", "useSpot": true}

After this change: ( Switch m5.xl to m5.2xl )

11m         Normal   SpotRecommendationGiven    spotpriceinfo/eks-vgu-k8s-instance-manager-nodes  {"apiVersion":"v1alpha1","spotPrice":"0.192", "useSpot": true}
5m6s        Normal   SpotRecommendationGiven    spotpriceinfo/eks-vgu-k8s-instance-manager-nodes  {"apiVersion":"v1alpha1","spotPrice":"0.384", "useSpot": true}
5s          Normal   SpotRecommendationGiven    spotpriceinfo/eks-vgu-k8s-instance-manager-nodes  {"apiVersion":"v1alpha1","spotPrice":"0.384", "useSpot": true}

Testing without EventOnly Mode:

  • unit-tests
  • Verified that switching from on-demand to spot instances work as expected.
  • Verified that switching from spot to on-demand instances work as expected.

@vgunapati vgunapati requested a review from shrinandj June 4, 2020 01:04
@vgunapati vgunapati merged commit 37758ee into keikoproj:master Jun 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Spot price is not updated based on LaunchConfig
2 participants