litmuschaos / litmus

Litmus helps SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub (https://hub.litmuschaos.io). Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
https://litmuschaos.io
Apache License 2.0
4.39k stars 688 forks source link

Re-activating chaos-infra after `INACTIVE` state or disabling via UI or disconnecting via `litmusctl disconnect` #4789

Open bitnahian opened 2 months ago

bitnahian commented 2 months ago

Question

I have Litmus Operator running Litmus 3.5.0 in GKE. I would like to be able to deactivate a chaos-infrastructure and reactivate it on ad-hoc basis. Once I've installed the CRDs I can enable the infra.

However, I've found that disabling it once (either via the UI or using litmusctl disconnect chaos-infra), I can't create an environment with the same name as before - since the INFRA_ID and ACCESS_KEY is different even if the names are the same.

I thought it might be because the ids are managed separately in Mongo collections. So I decided to delete the CRDs from the chaos-infra in the cluster. This causes the chaos-infra to show up as INACTIVE. But when I re-apply the manifests again, it remains as INACTIVE and never turns ACTIVE again.

I would like to be able to save costs by turning off chaos-infra resources, but I always need to start a chaos-infra from scratch if I decided to disable it/delete the resources. Is there any way to re-activate a chaos infra after deleting the chaos-infra manifests?