From c1de4d3ce28cbdd1ec5b57fed7d2059fc235c992 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 24 Oct 2022 10:08:55 +0200 Subject: [PATCH 1/2] docs: kube play: mention restart policy Mention the default restart policy in the `kube play` docs. Fixes: #16252 Signed-off-by: Valentin Rothberg --- docs/source/markdown/podman-kube-play.1.md.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/markdown/podman-kube-play.1.md.in b/docs/source/markdown/podman-kube-play.1.md.in index a8f1b8610641..e72248b70b31 100644 --- a/docs/source/markdown/podman-kube-play.1.md.in +++ b/docs/source/markdown/podman-kube-play.1.md.in @@ -23,6 +23,8 @@ Currently, the supported Kubernetes kinds are: Only three volume types are supported by kube play, the *hostPath*, *emptyDir*, and *persistentVolumeClaim* volume types. For the *hostPath* volume type, only the *default (empty)*, *DirectoryOrCreate*, *Directory*, *FileOrCreate*, *File*, *Socket*, *CharDevice* and *BlockDevice* subtypes are supported. Podman interprets the value of *hostPath* *path* as a file path when it contains at least one forward slash, otherwise Podman treats the value as the name of a named volume. When using a *persistentVolumeClaim*, the value for *claimName* is the name for the Podman named volume. When using an *emptyDir* volume, podman creates an anonymous volume that is attached the containers running inside the pod and is deleted once the pod is removed. +Note: The default restart policy for containers is `always`. You can change the default by setting the `restartPolicy` field in the spec. + Note: When playing a kube YAML with init containers, the init container will be created with init type value `once`. To change the default type, use the `io.podman.annotations.init.container.type` annotation to set the type to `always`. Note: *hostPath* volume types created by kube play will be given an SELinux shared label (z), bind mounts are not relabeled (use `chcon -t container_file_t -R `). From 622638b72b20f0fa2553e07da49956842dab6b0f Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 24 Oct 2022 10:14:34 +0200 Subject: [PATCH 2/2] docs: generate systemd: point to kube template Point to the kube template in the notes of `--new`. Signed-off-by: Valentin Rothberg --- docs/source/markdown/podman-generate-systemd.1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/markdown/podman-generate-systemd.1.md b/docs/source/markdown/podman-generate-systemd.1.md index 190b21b7163a..b74fa0b1e1d6 100644 --- a/docs/source/markdown/podman-generate-systemd.1.md +++ b/docs/source/markdown/podman-generate-systemd.1.md @@ -68,7 +68,7 @@ Use the name of the container for the start, stop, and description in the unit f Using this flag will yield unit files that do not expect containers and pods to exist. Instead, new containers and pods are created based on their configuration files. The unit files are created best effort and may need to be further edited; please review the generated files carefully before using them in production. -Note that `--new` only works on containers and pods created directly via Podman (i.e., `podman [container] {create,run}` or `podman pod create`). It does not work on containers or pods created via the REST API or via `podman kube play`. +Note that `--new` only works on containers and pods created directly via Podman (i.e., `podman [container] {create,run}` or `podman pod create`). It does not work on containers or pods created via the REST API or via `podman kube play`. For `podman kube play`, please use the `podman-kube@.service` systemd template instead. #### **--no-header**