blob: 7db8ee38740173c688b24c0ef67a46f445115586 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
package server
import (
"net/http"
"github.com/containers/podman/v2/pkg/api/handlers/libpod"
"github.com/gorilla/mux"
)
func (s *APIServer) registerGenerateHandlers(r *mux.Router) error {
// swagger:operation GET /libpod/generate/{name:.*}/kube libpod libpodGenerateKube
// ---
// tags:
// - containers
// - pods
// summary: Generate a Kubernetes YAML file.
// description: Generate Kubernetes YAML based on a pod or container.
// parameters:
// - in: path
// name: name:.*
// type: string
// required: true
// description: Name or ID of the container or pod.
// - in: query
// name: service
// type: boolean
// default: false
// description: Generate YAML for a Kubernetes service object.
// produces:
// - application/json
// responses:
// 200:
// description: no error
// schema:
// type: string
// format: binary
// 500:
// $ref: "#/responses/InternalError"
r.HandleFunc(VersionedPath("/libpod/generate/{name:.*}/kube"), s.APIHandler(libpod.GenerateKube)).Methods(http.MethodGet)
return nil
}
|