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

Encapsulate all commands #289

Merged
merged 4 commits into from
Dec 9, 2022
Merged

Encapsulate all commands #289

merged 4 commits into from
Dec 9, 2022

Conversation

ChrisKujawa
Copy link
Member

@ChrisKujawa ChrisKujawa commented Dec 9, 2022

In order to not run into issues with global variables reused and reset during worker execute, we encapsulated all commands and make it available via NewCMD so everytime we have to create a new command to execute zbchaos in the workers.

This allows us to always use a clean context.

Add new functions to always create new commands, such that we not reuse commands and not rely on globals
Move the properties namespace and kubeconfig in a scoped flags obj, which is always recreated when executing workers
@ChrisKujawa
Copy link
Member Author

@oleschoenburg with the last commit I was also able to move the namespace and kubeconfig to the flags struct

@ChrisKujawa ChrisKujawa merged commit d4e5724 into main Dec 9, 2022
@ChrisKujawa ChrisKujawa deleted the zell-new-cmds branch December 9, 2022 11:18
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