summaryrefslogtreecommitdiff
path: root/pkg/api/server
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2021-08-16 09:37:50 -0500
committerBrent Baude <bbaude@redhat.com>2021-08-24 14:26:14 -0500
commit1e176923b15360559d859000f2fb0c0a3e30f792 (patch)
tree5a888021a0fa58375ebe947b86e5dc37fd8d22a0 /pkg/api/server
parente9daaf62e3921b8c696f3abd92f001a9447c8aa1 (diff)
downloadpodman-1e176923b15360559d859000f2fb0c0a3e30f792.tar.gz
podman-1e176923b15360559d859000f2fb0c0a3e30f792.tar.bz2
podman-1e176923b15360559d859000f2fb0c0a3e30f792.zip
teardown play kube
add the ability for play kube to tear down based on the yaml used to play it. it is indicated by --down in the play kube command. volumes are NOT deleted during the teardown. pods and their containers are stopped and removed. Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/api/server')
-rw-r--r--pkg/api/server/register_play.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/pkg/api/server/register_play.go b/pkg/api/server/register_play.go
index c51301aa8..915d0d02e 100644
--- a/pkg/api/server/register_play.go
+++ b/pkg/api/server/register_play.go
@@ -59,5 +59,20 @@ func (s *APIServer) registerPlayHandlers(r *mux.Router) error {
// 500:
// $ref: "#/responses/InternalError"
r.HandleFunc(VersionedPath("/libpod/play/kube"), s.APIHandler(libpod.PlayKube)).Methods(http.MethodPost)
+ // swagger:operation DELETE /libpod/play/kube libpod PlayKubeDownLibpod
+ // ---
+ // tags:
+ // - containers
+ // - pods
+ // summary: Remove pods from play kube
+ // description: Tears down pods defined in a YAML file
+ // produces:
+ // - application/json
+ // responses:
+ // 200:
+ // $ref: "#/responses/DocsLibpodPlayKubeResponse"
+ // 500:
+ // $ref: "#/responses/InternalError"
+ r.HandleFunc(VersionedPath("/libpod/play/kube"), s.APIHandler(libpod.PlayKubeDown)).Methods(http.MethodDelete)
return nil
}