diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-11-22 21:52:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-22 21:52:31 +0100 |
commit | 0b7c132d9f42a00e31eb8dc5133946f83572a418 (patch) | |
tree | ff5362e963a4468fb215bf59d7a4caf9fad76bb4 /pkg | |
parent | ed83ef2517ba4d6a0c7659206fe3a2faa0bdf547 (diff) | |
parent | a8b3c67b974bd1b55a80188826e2c7ca983a9d95 (diff) | |
download | podman-0b7c132d9f42a00e31eb8dc5133946f83572a418.tar.gz podman-0b7c132d9f42a00e31eb8dc5133946f83572a418.tar.bz2 podman-0b7c132d9f42a00e31eb8dc5133946f83572a418.zip |
Merge pull request #12301 from umohnani8/table
Add note about volume with unprivileged container
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/domain/infra/abi/generate.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/generate.go b/pkg/domain/infra/abi/generate.go index a4d6bcf86..0defa1923 100644 --- a/pkg/domain/infra/abi/generate.go +++ b/pkg/domain/infra/abi/generate.go @@ -124,6 +124,14 @@ func (ic *ContainerEngine) GenerateKube(ctx context.Context, nameOrIDs []string, if err != nil { return nil, err } + if len(po.Spec.Volumes) != 0 { + warning := ` +# NOTE: If you generated this yaml from an unprivileged and rootless podman container on an SELinux +# enabled system, check the podman generate kube man page for steps to follow to ensure that your pod/container +# has the right permissions to access the volumes added. +` + content = append(content, []byte(warning)) + } b, err := generateKubeYAML(libpod.ConvertV1PodToYAMLPod(po)) if err != nil { return nil, err |