summaryrefslogtreecommitdiff
path: root/pkg/api/server
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2020-12-02 16:06:31 -0600
committerbaude <bbaude@redhat.com>2020-12-07 11:34:39 -0600
commit749ee2a10ed689a06da699659c59872c0ed770d7 (patch)
tree496d31fdaa07af5778214d6c22ea0222f50ded9b /pkg/api/server
parente6f80fa61aa082d2226b8258ea247186451d84d3 (diff)
downloadpodman-749ee2a10ed689a06da699659c59872c0ed770d7.tar.gz
podman-749ee2a10ed689a06da699659c59872c0ed770d7.tar.bz2
podman-749ee2a10ed689a06da699659c59872c0ed770d7.zip
generate kube on multiple containers
add the ability to add multiple containers into a single k8s pod instead of just one. also fixed some bugs in the resulting yaml where an empty service description was being added on error causing the k8s validation to fail. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/api/server')
-rw-r--r--pkg/api/server/register_generate.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/pkg/api/server/register_generate.go b/pkg/api/server/register_generate.go
index 60e5b03f7..bce5484ab 100644
--- a/pkg/api/server/register_generate.go
+++ b/pkg/api/server/register_generate.go
@@ -70,7 +70,7 @@ func (s *APIServer) registerGenerateHandlers(r *mux.Router) error {
// $ref: "#/responses/InternalError"
r.HandleFunc(VersionedPath("/libpod/generate/{name:.*}/systemd"), s.APIHandler(libpod.GenerateSystemd)).Methods(http.MethodGet)
- // swagger:operation GET /libpod/generate/{name:.*}/kube libpod libpodGenerateKube
+ // swagger:operation GET /libpod/generate/kube libpod libpodGenerateKube
// ---
// tags:
// - containers
@@ -78,9 +78,11 @@ func (s *APIServer) registerGenerateHandlers(r *mux.Router) error {
// summary: Generate a Kubernetes YAML file.
// description: Generate Kubernetes YAML based on a pod or container.
// parameters:
- // - in: path
- // name: name:.*
- // type: string
+ // - in: query
+ // name: names
+ // type: array
+ // items:
+ // type: string
// required: true
// description: Name or ID of the container or pod.
// - in: query
@@ -98,6 +100,6 @@ func (s *APIServer) registerGenerateHandlers(r *mux.Router) error {
// format: binary
// 500:
// $ref: "#/responses/InternalError"
- r.HandleFunc(VersionedPath("/libpod/generate/{name:.*}/kube"), s.APIHandler(libpod.GenerateKube)).Methods(http.MethodGet)
+ r.HandleFunc(VersionedPath("/libpod/generate/kube"), s.APIHandler(libpod.GenerateKube)).Methods(http.MethodGet)
return nil
}