google / google/symphony-gcp

GKE CLI requestReturnMachines implementend using reactive architecture

Open
#4 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7
Forks
2
PR merge metrics
No merged PRs in 30d

Description

The GKE CLI plug-in for HostFactory implements the `getReturnRequests` method in a reactive architecture, compared to [its actual proactive usage](https://www.ibm.com/docs/en/spectrum-symphony/7.3.2?topic=specification-getreturnrequests).

### The current implementation
`hf-provider/src/gke_provider/commands/get_return_requests.py`

This piece of code will look at the existing (GCPSR) resources and return the API compatible array of machines that **already have been deleted**. It works as an equivalent of `getRequestStatus` for `requestReturnMachines`, while not intended to.

### The intented implementation

It should only return API compatible array machines that **will be deleted** (with or without a grace period of 0 seconds), in event of eviction. This will in consequence trigger the execution of `requestReturnMachines` and its corresponding creation in GKE.

NOTE: While the current implementation actually works as intended by mistake, at least the commentaries of the code should be updated and the complementary behavior of the operator fixed. See #3 for more information.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.