github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/pkg/api/server/register_play.go (about)

     1  package server
     2  
     3  import (
     4  	"net/http"
     5  
     6  	"github.com/containers/podman/v2/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 libpodPlayKube
    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: string
    22  	//    description: Connect the pod to this network.
    23  	//  - in: query
    24  	//    name: tlsVerify
    25  	//    type: boolean
    26  	//    default: true
    27  	//    description: Require HTTPS and verify signatures when contacting registries.
    28  	//  - in: query
    29  	//    name: logDriver
    30  	//    type: string
    31  	//    description: Logging driver for the containers in the pod.
    32  	//  - in: query
    33  	//    name: start
    34  	//    type: boolean
    35  	//    default: true
    36  	//    description: Start the pod after creating it.
    37  	//  - in: body
    38  	//    name: request
    39  	//    description: Kubernetes YAML file.
    40  	//    schema:
    41  	//      type: string
    42  	// produces:
    43  	// - application/json
    44  	// responses:
    45  	//   200:
    46  	//     $ref: "#/responses/DocsLibpodPlayKubeResponse"
    47  	//   500:
    48  	//     $ref: "#/responses/InternalError"
    49  	r.HandleFunc(VersionedPath("/libpod/play/kube"), s.APIHandler(libpod.PlayKube)).Methods(http.MethodPost)
    50  	return nil
    51  }