github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/pkg/api/server/register_play.go (about) 1 package server 2 3 import ( 4 "net/http" 5 6 "github.com/hanks177/podman/v4/pkg/api/handlers/libpod" 7 "github.com/gorilla/mux" 8 ) 9 10 func (s *APIServer) registerPlayHandlers(r *mux.Router) error { 11 // swagger:operation POST /libpod/play/kube libpod PlayKubeLibpod 12 // --- 13 // tags: 14 // - containers 15 // - pods 16 // summary: Play a Kubernetes YAML file. 17 // description: Create and run pods based on a Kubernetes YAML file (pod or service kind). 18 // parameters: 19 // - in: query 20 // name: network 21 // type: array 22 // description: USe the network mode or specify an array of networks. 23 // items: 24 // type: string 25 // - in: query 26 // name: tlsVerify 27 // type: boolean 28 // default: true 29 // description: Require HTTPS and verify signatures when contacting registries. 30 // - in: query 31 // name: logDriver 32 // type: string 33 // description: Logging driver for the containers in the pod. 34 // - in: query 35 // name: start 36 // type: boolean 37 // default: true 38 // description: Start the pod after creating it. 39 // - in: query 40 // name: staticIPs 41 // type: array 42 // description: Static IPs used for the pods. 43 // items: 44 // type: string 45 // - in: query 46 // name: staticMACs 47 // type: array 48 // description: Static MACs used for the pods. 49 // items: 50 // type: string 51 // - in: body 52 // name: request 53 // description: Kubernetes YAML file. 54 // schema: 55 // type: string 56 // produces: 57 // - application/json 58 // responses: 59 // 200: 60 // $ref: "#/responses/playKubeResponseLibpod" 61 // 500: 62 // $ref: "#/responses/internalError" 63 r.HandleFunc(VersionedPath("/libpod/play/kube"), s.APIHandler(libpod.PlayKube)).Methods(http.MethodPost) 64 // swagger:operation DELETE /libpod/play/kube libpod PlayKubeDownLibpod 65 // --- 66 // tags: 67 // - containers 68 // - pods 69 // summary: Remove pods from play kube 70 // description: Tears down pods defined in a YAML file 71 // produces: 72 // - application/json 73 // responses: 74 // 200: 75 // $ref: "#/responses/playKubeResponseLibpod" 76 // 500: 77 // $ref: "#/responses/internalError" 78 r.HandleFunc(VersionedPath("/libpod/play/kube"), s.APIHandler(libpod.PlayKubeDown)).Methods(http.MethodDelete) 79 return nil 80 }