Skip to content

Commit

Permalink
Spot (#316)
Browse files Browse the repository at this point in the history
* Handling the Spot instances disappearance

* Adjusted Changelog

* Adjusted Changelog version

* Changed the status to Drained in case a node does not exist anymore
  • Loading branch information
silenteh authored Mar 3, 2023
1 parent fa6cbda commit 8f36385
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.0.2] - 2023-03-02
## [2.0.3] - 2023-03-02

- Changed the DrainingConfig status to `Drained` instead of `Timeout`

## [2.0.2] - 2023-03-02

Expand Down
4 changes: 2 additions & 2 deletions service/controller/resource/drainer/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ func (r *Resource) EnsureCreated(ctx context.Context, obj interface{}) error {

// if we get here it means we could not find the instance in the list of nodes
// this can happen for example if an instance is SPOT and therefore AWS just deletes it
r.logger.LogCtx(ctx, "level", "warn", "message", "Could not find the instance. Setting the draining status to: timed out")
return r.updateDrainerStatus(ctx, drainerConfig.Status.NewTimeoutCondition(), drainerConfig, k8sClient)
r.logger.LogCtx(ctx, "level", "warn", "message", "Could not find the instance. Setting the draining status to: drained")
return r.updateDrainerStatus(ctx, drainerConfig.Status.NewDrainedCondition(), drainerConfig, k8sClient)

}
}
Expand Down

0 comments on commit 8f36385

Please sign in to comment.