diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-04-12 12:36:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-12 12:36:20 +0200 |
commit | 9d3e31071087908207a8f7fdc84939edf3dc47c0 (patch) | |
tree | 7993a84a9b70504b2a99c88085e5e7205bc0b94b /cmd/podman/generate | |
parent | 3b03ff7d1ea65c31ca8c9a28e70f7dd5a43afbf0 (diff) | |
parent | 61cb6d61dd420a000c843171b5917b5595874a67 (diff) | |
download | podman-9d3e31071087908207a8f7fdc84939edf3dc47c0.tar.gz podman-9d3e31071087908207a8f7fdc84939edf3dc47c0.tar.bz2 podman-9d3e31071087908207a8f7fdc84939edf3dc47c0.zip |
Merge pull request #9935 from EduardoVega/5788-kube-volume
Add support for play/generate kube PersistentVolumeClaims and Podman volumes
Diffstat (limited to 'cmd/podman/generate')
-rw-r--r-- | cmd/podman/generate/generate.go | 4 | ||||
-rw-r--r-- | cmd/podman/generate/kube.go | 14 |
2 files changed, 10 insertions, 8 deletions
diff --git a/cmd/podman/generate/generate.go b/cmd/podman/generate/generate.go index c559b9e1b..a6d39bbbe 100644 --- a/cmd/podman/generate/generate.go +++ b/cmd/podman/generate/generate.go @@ -12,8 +12,8 @@ var ( // Command: podman _generate_ generateCmd = &cobra.Command{ Use: "generate", - Short: "Generate structured data based on containers and pods.", - Long: "Generate structured data (e.g., Kubernetes yaml or systemd units) based on containers and pods.", + Short: "Generate structured data based on containers, pods or volumes.", + Long: "Generate structured data (e.g., Kubernetes YAML or systemd units) based on containers, pods or volumes.", RunE: validate.SubCommandExists, } containerConfig = util.DefaultContainerConfig() 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`, } ) |