cloud-pipeline icon indicating copy to clipboard operation
cloud-pipeline copied to clipboard

Support cloud instances in 'Cluster state' panel

Open ekazachkova opened this issue 1 year ago • 1 comments

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 into Cluster state panel
    • clusterStateRegionProperties - 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/loadAll shall support an input parameter machineType=<KUBE|CLOUD|ALL>
      • KUBE - load kubernetes nodes only (default)
      • CLOUD - load cloud instances only from those regions where clusterInclude flag enabled.
      • ALL - load both kubernetes nodes and cloud instances
    • Loads node by name API method GET /cluster/node/<instance ID>/load shall support cloud instances and new input parameters
      • machineType=<KUBE|CLOUD|ALL> - default: KUBE
      • regionId (optional) - cloud region ID. If not provided all cloud regions with enabled clusterInclude flag will be scanned.
    • Terminate node by name API method DELETE /cluster/node/<instance ID> shall also support input parameters machineType (default: KUBE) and regionId (optional) and cloud instances termination.
  • Returned node object shall contain:

    • a new field machineType
    • a label cloud_region_id
  • AWS sdk methods shall be executed with timeout (this value can be configured via cluster.instance.load.timeout.seconds system preference)

  • All actions with machineType=CLOUD shall be available for admin users only

ekazachkova avatar Nov 29 '24 07:11 ekazachkova