Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The chaosgcp.apphub.actions Action to inject_fault / remove fault i… #30

Closed

Conversation

ashishjain2412
Copy link
Contributor

The chaosgcp.apphub.actions Action to inject_fault / remove fault in apphub application based on given url_map, if exists in application in app_hub .
inject_fault_if_url_map_exists_app_hub and remove_fault_if_url_map_exists_app_hub , these two function can be used to inject fault. fault can be injected/removed if given url map exists in apphub application.

	"method": [
	        {
	    "name" : "inject_fault_if_url_map_exists_app_hub",
	    "type" : "action",
	        "provider": {
	                    "type": "python",
	                "module": "chaosgcp.apphub.actions",
	                "func": "inject_fault_if_url_map_exists_app_hub",
	            "secrets": ["gcp"],
	                    "arguments": {
	                        "application_name":"myapphub-app1",
	                        "region":"us-central1",
	                        "project_id":"${gcp_project_id}",
	                        "url_map": "${url_map_name}",
	                        "target_name": "${url_map_target_name}",
	                        "target_path": "/*",
	                         "regional": true,
	                        "impacted_percentage": 100.0,
	                        "http_status": 503
	                    }
	            },
	            "pauses": {
	                    "after" : 35
	            }
	        }
	 ],
	 "rollbacks": [
	        {
	            "name" : "remove_fault_if_url_map_exists_app_hub",
	            "type" : "action",
	            "provider": {
	                            "type": "python",
	                            "module": "chaosgcp.apphub.actions",
	                            "func": "remove_fault_if_url_map_exists_app_hub",
	                            "secrets": ["gcp"],
	                            "arguments": {
	                              "application_name":"myapphub-app1",
	                              "region":"us-central1",
	                              "project_id":"${gcp_project_id}",
	                              "url_map": "${url_map_name}",
	                              "target_name": "${url_map_target_name}",
	                              "target_path": "/*",
	                              "regional" : true
	                            }
	                        }
	        }
	    ]
    

@ashishjain2412 ashishjain2412 marked this pull request as ready for review June 28, 2024 09:13
Copy link
Contributor

@Lawouach Lawouach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants