diff options
author | Eduardo Vega <edvegavalerio@gmail.com> | 2021-03-26 18:16:41 -0600 |
---|---|---|
committer | Eduardo Vega <edvegavalerio@gmail.com> | 2021-04-09 14:01:13 -0600 |
commit | 61cb6d61dd420a000c843171b5917b5595874a67 (patch) | |
tree | b56af885a529beb0ddf0386b090bc7cda5c93b49 /cmd/podman/generate/kube.go | |
parent | f143de9db6861cd8b8d6fc4e03f2826041307982 (diff) | |
download | podman-61cb6d61dd420a000c843171b5917b5595874a67.tar.gz podman-61cb6d61dd420a000c843171b5917b5595874a67.tar.bz2 podman-61cb6d61dd420a000c843171b5917b5595874a67.zip |
Add support for play/generate kube volumes
Signed-off-by: Eduardo Vega <edvegavalerio@gmail.com>
Diffstat (limited to 'cmd/podman/generate/kube.go')
-rw-r--r-- | cmd/podman/generate/kube.go | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/cmd/podman/generate/kube.go b/cmd/podman/generate/kube.go index 90e58271f..9767b0e06 100644 --- a/cmd/podman/generate/kube.go +++ b/cmd/podman/generate/kube.go @@ -17,20 +17,22 @@ import ( var ( kubeOptions = entities.GenerateKubeOptions{} kubeFile = "" - kubeDescription = `Command generates Kubernetes pod and service YAML (v1 specification) from Podman containers or a pod. + kubeDescription = `Command generates Kubernetes Pod, Service or PersistenVolumeClaim YAML (v1 specification) from Podman containers, pods or volumes. -Whether the input is for a container or pod, Podman will always generate the specification as a pod.` + Whether the input is for a container or pod, Podman will always generate the specification as a pod.` kubeCmd = &cobra.Command{ - Use: "kube [options] {CONTAINER...|POD}", - Short: "Generate Kubernetes YAML from a container or pod.", + Use: "kube [options] {CONTAINER...|POD...|VOLUME...}", + Short: "Generate Kubernetes YAML from containers, pods or volumes.", Long: kubeDescription, RunE: kube, Args: cobra.MinimumNArgs(1), - ValidArgsFunction: common.AutocompleteContainersAndPods, + ValidArgsFunction: common.AutocompleteForKube, Example: `podman generate kube ctrID podman generate kube podID - podman generate kube --service podID`, + podman generate kube --service podID + podman generate kube volumeName + podman generate kube ctrID podID volumeName --service`, } ) |