mirror of
https://github.com/containers/podman.git
synced 2025-06-03 20:33:20 +08:00

Drop the support for remote clients to generate systemd-service files. The generated files are machine-dependent and hence relate only to the a local machine. Furthermore, a proper service management when using a remote-client is not possible as systemd has no access to a process. Dropping the support will also reduce the risk of making users believe that the generated services are usable in a remote scenario. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
32 lines
737 B
Go
32 lines
737 B
Go
// +build varlink
|
|
|
|
package varlinkapi
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"github.com/containers/libpod/cmd/podman/shared"
|
|
iopodman "github.com/containers/libpod/cmd/podman/varlink"
|
|
)
|
|
|
|
// GenerateKube ...
|
|
func (i *LibpodAPI) GenerateKube(call iopodman.VarlinkCall, name string, service bool) error {
|
|
pod, serv, err := shared.GenerateKube(name, service, i.Runtime)
|
|
if err != nil {
|
|
return call.ReplyErrorOccurred(err.Error())
|
|
}
|
|
podB, err := json.Marshal(pod)
|
|
if err != nil {
|
|
return call.ReplyErrorOccurred(err.Error())
|
|
}
|
|
servB, err := json.Marshal(serv)
|
|
if err != nil {
|
|
return call.ReplyErrorOccurred(err.Error())
|
|
}
|
|
|
|
return call.ReplyGenerateKube(iopodman.KubePodService{
|
|
Pod: string(podB),
|
|
Service: string(servB),
|
|
})
|
|
}
|