cloud-pipeline
cloud-pipeline copied to clipboard
Support cloud instances in 'Cluster state' panel
Background
Cloud Pipeline does not show cloud instance at Cluster State panel and it would be nice to support it.
Approach
-
API shall support a new properties for cloud regions:
clusterInclude- flag that indicates that instances from this cloud region shall be included intoCluster statepanelclusterStateRegionProperties- object describes tag filters for instances that shall be shown (optional)
{ "tagsFilter": { "instanceTagKey": "instanceTagValue", ... } } -
API shall be able to manipulate both kubernetes nodes and cloud instances:
- Load all
API method
GET /cluster/node/loadAllshall support an input parametermachineType=<KUBE|CLOUD|ALL>KUBE- load kubernetes nodes only (default)CLOUD- load cloud instances only from those regions whereclusterIncludeflag enabled.ALL- load both kubernetes nodes and cloud instances
- Loads node by name
API method
GET /cluster/node/<instance ID>/loadshall support cloud instances and new input parametersmachineType=<KUBE|CLOUD|ALL>- default:KUBEregionId(optional) - cloud region ID. If not provided all cloud regions with enabledclusterIncludeflag will be scanned.
- Terminate node by name
API method
DELETE /cluster/node/<instance ID>shall also support input parametersmachineType (default: KUBE)andregionId (optional)and cloud instances termination.
- Load all
API method
-
Returned node object shall contain:
- a new field
machineType - a label
cloud_region_id
- a new field
-
AWS sdk methods shall be executed with timeout (this value can be configured via
cluster.instance.load.timeout.secondssystem preference) -
All actions with
machineType=CLOUDshall be available for admin users only