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

k8s_exec: Select first container from the pod #363

Merged

Conversation

Akasurde
Copy link
Member

@Akasurde Akasurde commented Feb 3, 2022

SUMMARY

kubectl command select first container from the pod in order
to execute commands on. We replicate the same behavior in k8s_exec
module.

Fixes: #358

Signed-off-by: Abhijeet Kasurde [email protected]

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

changelogs/fragments/358-k8s_exec.yml
plugins/modules/k8s_exec.py

@Akasurde Akasurde added has_issue This PR has a related issue it could close. type/enhancement New feature or request labels Feb 3, 2022
@softwarefactory-project-zuul
Copy link

Build failed.

Copy link
Member

@gravesm gravesm left a comment

Choose a reason for hiding this comment

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

This looks good. Could you also add a test for a pod with two containers?

@Akasurde
Copy link
Member Author

Akasurde commented Feb 4, 2022

This looks good. Could you also add a test for a pod with two containers?

yes sure

@goneri
Copy link
Member

goneri commented Feb 4, 2022

recheck

@softwarefactory-project-zuul

This comment was marked as duplicate.

@goneri
Copy link
Member

goneri commented Feb 4, 2022

recheck

@softwarefactory-project-zuul

This comment was marked as outdated.

kubectl command select first container from the pod in order
to execute commands on. We replicate the same behavior in k8s_exec
module.

Fixes: ansible-collections#358

Signed-off-by: Abhijeet Kasurde <[email protected]>
@softwarefactory-project-zuul
Copy link

Build succeeded.

@Akasurde
Copy link
Member Author

Akasurde commented Feb 7, 2022

mergeit

1 similar comment
@Akasurde
Copy link
Member Author

Akasurde commented Feb 8, 2022

mergeit

@Akasurde
Copy link
Member Author

Akasurde commented Feb 8, 2022

regate

@Akasurde
Copy link
Member Author

Akasurde commented Feb 8, 2022

mergeit

@Akasurde Akasurde closed this Feb 8, 2022
@Akasurde Akasurde reopened this Feb 8, 2022
@softwarefactory-project-zuul
Copy link

Build failed.

@Akasurde
Copy link
Member Author

Akasurde commented Feb 8, 2022

recheck

@softwarefactory-project-zuul
Copy link

Build succeeded.

@Akasurde
Copy link
Member Author

Akasurde commented Feb 8, 2022

mergeit

@asmacdo
Copy link

asmacdo commented Feb 9, 2022

I didn't check out the code, but this looks like this will solve my issue, thanks! #358

@Akasurde
Copy link
Member Author

I didn't check out the code, but this looks like this will solve my issue, thanks! #358

Thanks for the feedback.

@softwarefactory-project-zuul
Copy link

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit bf3fe91 into ansible-collections:main Feb 10, 2022
@Akasurde Akasurde deleted the i358 branch February 10, 2022 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has_issue This PR has a related issue it could close. mergeit type/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

k8s_exec does not behave the same as kubectl exec on a pod with 2 containers.
5 participants