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

Make scenario parsing logic for litmsuctl create scenario command independent of install-chaos-experiments step #113

Closed
Jonsy13 opened this issue Dec 5, 2022 · 3 comments

Comments

@Jonsy13
Copy link
Collaborator

Jonsy13 commented Dec 5, 2022

Generally the scenario manifests created via Chaos-Center contains an install-chaos-experiments step, which contains definition for all experiments users are going to run as part of that scenario. At the time of implementation of this feature (litmusctl create scenario), it was decided to use install-chaos-experiments step to fetch names of all experiments, users have added in the manifest.

But this can't be always the case, users may not have install-chaos-experiments step in their manifests while scheduling it via litmusctl.

When we upload a manifest in frontend, we had enhanced the logic in frontend by searching for templates which contains kind: ChaosEngine & fetch their names. Since a template containing kind: ChaosEngine denotes a chaos experiment. Same can be done in litmusctl making it independent of install-chaos-experiment.

For reference, how it's done in frontend - https://github.com/litmuschaos/litmus/blob/643f3bffb87a20fee209a77b842ad7eda01d1e54/litmus-portal/frontend/src/utils/yamlUtils.ts#L250

@Jonsy13
Copy link
Collaborator Author

Jonsy13 commented Dec 5, 2022

Slack thread for reference - https://kubernetes.slack.com/archives/CNXNB0ZTN/p1669734627249449

@iamnicoj
Copy link
Contributor

This issue can be closed based on PR #114

@Jonsy13
Copy link
Collaborator Author

Jonsy13 commented Dec 21, 2022

Thanks @iamnicoj for this enhancement!! This is now released as part of 0.16.0 release of litmusctl.

@Jonsy13 Jonsy13 closed this as completed Dec 21, 2022
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

No branches or pull requests

2 participants