litmus icon indicating copy to clipboard operation
litmus copied to clipboard

Implement API that takes the key value pairs of information necessary to inject a chaos instead of Passing a complete Manifest.

Open spshuklaji opened this issue 1 year ago • 1 comments

Implement API that takes the key value pairs of information necessary to inject a chaos instead of Passing a complete Manifest.

Current Approach

Currently we need to have a manifest file locally, and then convert it into a support format then pass the manifest as value to the API. This is complicated and error prone.

 "ChaosWorkFlowRequest": {
                "projectID": projectID,
                "clusterID": clusterID,
                "workflowManifest": "YOUR COMPLETE MANIFEST FILE HERE",
                "workflowName": chaos_specifications['CHAOS_EXP_NAME'],
                "cronSyntax": "",
                "workflowDescription": f'Chaos Workflow information: {chaos_specifications["DESCRIPTION"]}',
                "weightages": [
                ],
                "isCustomWorkflow": False
            }

Requested Feature

This sample approach eliminates the above complications and basically mimics the LitmusPortal UI's simplicity. As in the UI we don't write the manifest file but just enter some necessary values in the Chaos Config Form and click to start the chaos.

"ChaosWorkFlowConfig" : {
                "chaos_experiment_name": "pod-delete",
                "chaos_target_label": "app=ngnix",
                "chaos_target_appkind": "deployment",
                "total_chaos_duration": "120",
                "chaos_interval": "60",
                "pods_affected_perc": "100",

                "projectID": projectID,
                "clusterID": clusterID,
                "workflowName": chaos_specifications['CHAOS_EXP_NAME'],
                "cronSyntax": "",
                "workflowDescription": f'Chaos Workflow information: {chaos_specifications["DESCRIPTION"]}',
                "weightages": [
                ],
                "isCustomWorkflow": False
 }

spshuklaji avatar Dec 22 '23 04:12 spshuklaji

Hi @spshuklaji , this is a good feature request. I would request you to join the Litmus contributors call, where you can pitch this idea to the team. We will decide on the same.

amityt avatar Jan 19 '24 06:01 amityt