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

Update the logic for deleting pods/containers in podman_play #727

Merged
merged 3 commits into from
Mar 28, 2024

Conversation

nishipy
Copy link
Contributor

@nishipy nishipy commented Mar 23, 2024

As discussed here, this PR improves the logic for deleting pods/containers in podman_play, more specifically updatesremove_associated_pods and uses podman kube play --down instead.

Signed-off-by: nishipy <goodisonev4@gmail.com>
Signed-off-by: nishipy <goodisonev4@gmail.com>
Signed-off-by: nishipy <goodisonev4@gmail.com>
@nishipy nishipy marked this pull request as ready for review March 24, 2024 13:05
changed = False
kube_file = self.module.params['kube_file']

rc, out, err = self._command_run([self.executable, "kube", "play", "--down", kube_file])
Copy link
Member

Choose a reason for hiding this comment

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

We can probably check in followups that nothing is removed, or something is remove,a nd set changed var accordingly.

$ podman kube play --down /home/sshnaidm/tmp/lite-pod.yaml
Pods stopped:
17b422aa4a3f3f4563d4faf029d2556fb07890b225b097a7dfae4a3395914c3a
Pods removed:
17b422aa4a3f3f4563d4faf029d2556fb07890b225b097a7dfae4a3395914c3a
Secrets removed:
Volumes removed:

$ podman kube play --down /home/sshnaidm/tmp/lite-pod.yaml
Pods stopped:
Pods removed:
Secrets removed:
Volumes removed:

@sshnaidm
Copy link
Member

Thanks!

@sshnaidm sshnaidm merged commit 6e04b20 into containers:master Mar 28, 2024
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.

2 participants