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

enable ALL for TARGET_CONTAINER #683

Merged
merged 1 commit into from
Mar 14, 2024
Merged

Conversation

MichaelMorrisEst
Copy link
Contributor

What this PR does / why we need it:
Enables the user to specify ALL for TARGET_CONTAINERS to execute against all containers in the pods in parallel execution

Which issue this PR fixes
Closes #682

Special notes for your reviewer:

Checklist:

  • Fixes #
  • PR messages has document related information
  • Labelled this PR & related issue with breaking-changes tag
  • PR messages has breaking changes related information
  • Labelled this PR & related issue with requires-upgrade tag
  • PR messages has upgrade related information
  • Commit has unit tests
  • Commit has integration tests
  • E2E run Required for the changes

Copy link
Member

@ispeakc0de ispeakc0de left a comment

Choose a reason for hiding this comment

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

LGTM, have you tested this PR?

@ispeakc0de ispeakc0de closed this Mar 1, 2024
@ispeakc0de ispeakc0de reopened this Mar 1, 2024
@MichaelMorrisEst
Copy link
Contributor Author

Hi @ispeakc0de

Yes, I have tested.

When I use a specific container name ("hello-world-2"), I see in the logs that specific container being targeted:

time="2024-03-04T00:11:23Z" level=info msg="Helper Name: container-kill"
time="2024-03-04T00:11:23Z" level=info msg="[PreReq]: Getting the ENV variables"
time="2024-03-04T00:11:23Z" level=info msg="Injecting chaos on target: {name: ahoy-hello-world-778f6696cb-sqfjp, namespace: litmus, container: hello-world-2}"
time="2024-03-04T00:11:23Z" level=info msg="[Info]: Details of application under chaos injection" RestartCountBefore=49 PodName=ahoy-hello-world-778f6696cb-sqfjp ContainerName=hello-world-2

When I use "ALL" for the container name, I see both the containers in the pod being selected:

time="2024-03-04T00:15:52Z" level=info msg="Helper Name: container-kill"
time="2024-03-04T00:15:52Z" level=info msg="[PreReq]: Getting the ENV variables"
time="2024-03-04T00:15:52Z" level=info msg="Injecting chaos on target: {name: ahoy-hello-world-778f6696cb-sqfjp, namespace: litmus, container: hello-world}"
time="2024-03-04T00:15:52Z" level=info msg="Injecting chaos on target: {name: ahoy-hello-world-778f6696cb-sqfjp, namespace: litmus, container: hello-world-2}"
time="2024-03-04T00:15:52Z" level=info msg="[Info]: Details of application under chaos injection" RestartCountBefore=0 PodName=ahoy-hello-world-778f6696cb-sqfjp ContainerName=hello-world
time="2024-03-04T00:15:52Z" level=info msg="[Info]: Details of application under chaos injection" RestartCountBefore=49 PodName=ahoy-hello-world-778f6696cb-sqfjp ContainerName=hello-world-2

@neelanjan00
Copy link
Member

@MichaelMorrisEst can you please rebase the branch?

Signed-off-by: MichaelMorris <[email protected]>
@MichaelMorrisEst
Copy link
Contributor Author

@MichaelMorrisEst can you please rebase the branch?

No problem @neelanjan00 , rebased there now

@neelanjan00
Copy link
Member

@ispeakc0de are we good to merge?

@ksatchit ksatchit merged commit b5a24b4 into litmuschaos:master Mar 14, 2024
4 of 8 checks passed
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.

Add support for ALL for TARGET_CONTAINER for parallel executions
5 participants