899 Commits

Author SHA1 Message Date
a7fc8a1460 Improve the error message for usused configMaps
If you run `podman play kube` on a yaml file that only contains
configMaps, podman will fail with the error:

	Error: YAML document does not contain any supported kube kind

This is not strictly true; configMaps are a supported kube kind. The
problem is that configMaps aren't a standalone entity. They have to be
used in a container somewhere, otherwise they don't do anything.

This change adds a new message in the case when there only configMaps
resources. It would be helpful if podman reported which configMaps are
unused on every invocation of kube play. However, even if that feedback
were added, this new error messages still helpfully explains the reason
that podman is not creating any resources.

[NO NEW TESTS NEEDED]

Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2022-02-24 08:59:11 -06:00
6f7a803d06 Cleanup display of trust with transports
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-02-22 15:08:58 -05:00
fab82a7c9c Merge pull request #13059 from cdoern/clone
Implement Podman Container Clone
2022-02-22 10:10:49 -05:00
a746a61a17 Merge pull request #13286 from flouthoc/kube-build-false-default
kube: honor `--build=false` if specified.
2022-02-21 15:33:39 -05:00
9ce61e3a49 kube: honor --build=false and make --build=true by default
`podman play kube` tries to build images even if `--build` is set to
false so lets honor that and make `--build` , `true` by default so it
matches the original behviour.

Signed-off-by: Aditya R <arajan@redhat.com>
2022-02-21 23:52:48 +05:30
94df701512 Implement Podman Container Clone
podman container clone takes the id of an existing continer and creates a specgen from the given container's config
recreating all proper namespaces and overriding spec options like resource limits and the container name if given in the cli options

this command utilizes the common function DefineCreateFlags meaning that we can funnel as many create options as we want
into clone over time allowing the user to clone with as much or as little of the original config as they want.

container clone takes a second argument which is a new name and a third argument which is an image name to use instead of the original container's

the current supported flags are:

--destroy (remove the original container)
--name (new ctr name)
--cpus (sets cpu period and quota)
--cpuset-cpus
--cpu-period
--cpu-rt-period
--cpu-rt-runtime
--cpu-shares
--cpuset-mems
--memory
--run

resolves #10875

Signed-off-by: cdoern <cdoern@redhat.com>
Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
Signed-off-by: cdoern <cdoern@redhat.com>
2022-02-20 21:11:14 -05:00
23a7f4e0de Option --url and --connection should imply --remote.
Closes #13242

Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
2022-02-19 14:53:37 +00:00
f918a9418f Merge pull request #13075 from n1hility/mac-forward-helper
Mac API forwarding using a privileged docker socket claim helper
2022-02-16 13:39:42 -05:00
c74f8f04fd Introduce podman machine init --root=t|f and podman machine set --root=t|f
Switch default to rootless for mac and windows

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-02-16 03:49:17 -06:00
10580ec198 Unify ls --filter docs for networks and pods
Signed-off-by: Patrycja Guzik <patrycja.k.guzik@gmail.com>

#13078 follow-up
2022-02-15 23:54:45 +01:00
4a166c8b63 podman network: add documentation for netavark
Add some docs about the different network backends. Also remove the CNI
word from network since we refer to either a netavark or CNI config.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-02-15 16:46:23 +01:00
956664f65b Merge pull request #12930 from cdoern/podCgroup
Podman pod create --share-parent vs --share=cgroup
2022-02-04 09:41:12 -05:00
2cc3274289 Merge pull request #13125 from nalind/url-docs
[CI:DOCS] Document `schema` values in the `--url` flag
2022-02-03 10:07:20 -05:00
9eb88ea474 Podman pod create --share-parent vs --share=cgroup
separated cgroupNS sharing from setting the pod as the cgroup parent,
made a new flag --share-parent which sets the pod as the cgroup parent for all
containers entering the pod

remove cgroup from the default kernel namespaces since we want the same default behavior as before which is just the cgroup parent.

resolves #12765

Signed-off-by: cdoern <cdoern@redhat.com>
Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
Signed-off-by: cdoern <cdoern@redhat.com>
2022-02-03 09:30:17 -05:00
55c4a1468b system prune: remove all networks
podman system prune should also remove all networks. When we want to
users to migrate to the new network stack we recommend to run podman
system reset. However this did not remove networks and if there were
still networks around we would continue to use cni since this was
considered an old system.

There is one exception for the default network. It should not be removed
since this could cause other issues when it no longer exists. The
network backend detection logic ignores the default network so this is
fine.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-02-03 13:14:07 +01:00
fee76f6abc Document schema values in the --url flag
Document the recognized `schema` types that can be used in a value
passed to the `--url` command line flag.

[CI:DOCS]

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2022-02-02 18:07:10 -05:00
56a1c76ad3 Merge pull request #13104 from giuseppe/fix-podman-stats-comment
[CI:DOCS] docs: clarify rootless net stats
2022-02-02 10:41:27 -05:00
60528b9c99 Merge pull request #13066 from rhatdan/man
Clarify remote client means Mac and Windows
2022-02-01 15:41:36 -05:00
85e8c1c9a7 docs: clarify rootless net stats
follow-up for https://github.com/containers/podman/pull/13101

[CI:DOCS]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-02-01 20:16:24 +01:00
865f0a1977 libpod: report slirp4netns network stats
by default slirp4netns uses the tap0 device.  When slirp4netns is
used, use that device by default instead of eth0.

Closes: https://github.com/containers/podman/issues/11695

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-02-01 16:23:58 +01:00
905d31ddd3 Merge pull request #13100 from fj-tsubasa/oom-kill-disable-man
[CI:DOCS] Add notes to "--oom-kill-disable" not supported on cgroups V2
2022-02-01 08:26:58 -05:00
009d9eb679 Add notes to "--oom-kill-disable" not supported on cgroups V2
Clarify "--oom-kill-disable" is not supported on cgroups V2 in
documentation.

Signed-off-by: Tsubasa Watanabe <w.tsubasa@fujitsu.com>
2022-01-31 17:14:46 +09:00
a8fb8f52c7 Adapt podman images ls filters docs to be aligned with prune filters docs
Signed-off-by: Patrycja Guzik <patrycja.k.guzik@gmail.com>
2022-01-29 22:50:49 +01:00
6365437871 Clarify remote client means Mac and Windows
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-28 08:14:05 -05:00
1b544b7424 Merge pull request #12712 from flouthoc/volume_overlay_advanced
volume: add support for non-volatile `upperdir`,`workdir` for overlay volumes
2022-01-28 07:06:02 -05:00
e64e6500d3 volume: add support for non-volatile upperdir,workdir for overlay volumes
Often users want their overlayed volumes to be `non-volatile` in nature
that means that same `upper` dir can be re-used by one or more
containers but overall of nature of volumes still have to be `overlay`
so work done is still on a overlay not on the actual volume.

Following PR adds support for more advanced options i.e custom `workdir`
and `upperdir` for overlayed volumes. So that users can re-use `workdir`
and `upperdir` across new containers as well.

Usage
```console

$ podman run -it -v myvol:/data:O,upperdir=/path/persistant/upper,workdir=/path/persistant/work alpine sh

```

Signed-off-by: Aditya R <arajan@redhat.com>
2022-01-28 13:10:15 +05:30
bedbc3e6fc Merge pull request #13042 from Luap99/subnets
network create: allow multiple subnets
2022-01-27 12:16:50 -05:00
6961d91206 network create: allow multiple subnets
podman network create --subnet, --gateway and --ip-range can now be
specified multiple times to join the network to more than one subnet.
This is very useful if you want to use a dual stack network and assign a
fixed ipv4 and ipv6 subnet. The order of the options is important here,
the first --gateway/--ip-range will be assigned to the first subnet and
so on.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-01-27 16:38:39 +01:00
9e7e91c13e Merge pull request #13034 from rhatdan/docs
CI:DOCS: Unify podman prune filter description: volumes, networks, system
2022-01-27 09:42:50 -05:00
24dc02064e Fix sort ordering of filters
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-27 07:19:02 -05:00
63b1557a25 Unify podman prune filter description: volumes, networks, system
follow up of #12976

Signed-off-by: Patrycja Guzik <patrycja.k.guzik@gmail.com>
2022-01-27 07:13:06 -05:00
4a4d86d40f Bump Buildah to v1.24.0
Bumps Buildah to v1.24.0 and adopts the new values for pull:
true, false, never, and always.  The pull-never and pull-always options
for the build command are still usable, but they have been removed from
the man page documentation with this change.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2022-01-27 07:03:56 -05:00
42e1c29816 [CI:DOCS] Fix typos and improve language
* Add more documentation fixes similar to
  8099a61b648a1cfc862461487f1db9ecd47d065e

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-24 23:32:09 +01:00
8099a61b64 [CI:DOCS] Fix typos and improve language
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-24 19:34:36 +01:00
b75d6baf07 Merge pull request #12976 from patrycja-guzik/docs-labels
[CI:DOCS] Fix filter description and unify filters docs for containers/images prune
2022-01-24 09:30:23 -05:00
e68d188f64 [CI:DOCS] fix typo subpordinate
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-22 22:47:28 +01:00
aff6a5af88 Fix filter description and unify filters docs for containers/images prune
Signed-off-by: Patrycja Guzik <patrycja.k.guzik@gmail.com>
2022-01-22 16:22:02 +01:00
5736649eb8 Run codespell on code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-21 09:52:12 -05:00
b9a2d8698a Handlers for generate systemd with custom dependencies
This commit includes:
* Handlers for generate systemd unit
  with manually defined dependencies such as:
  Wants=, After= and Requires=

* The new unit and e2e tests for checking generated systemd units
  for container and pod with custom dependencies

* Documented descriptions for custom dependencies options

Signed-off-by: Eugene (Evgenii) Shubin <esendjer@gmail.com>
2022-01-19 21:46:16 +05:00
c0e0723463 rename --cni-config-dir to --network-config-dir
Since this option will also be used for netavark we should rename it to
something more generic. It is important that --cni-config-dir still
works otherwise we could break existing container cleanup commands.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-01-18 19:28:25 +01:00
d6e55577cf [CI:DOCS] fix default branch links
* Replace https://github.com/containers/podman/blob/master
  with https://github.com/containers/podman/blob/main
  to match the new default branch "main". Previously
  the default branch was "master". The substitutions were
  made in the documentation but not the code.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-15 20:56:19 +01:00
ab8a508489 [CI:DOCS] Fix typo in --env
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-15 12:50:03 +01:00
482e0b11d9 Merge pull request #12849 from cdoern/podProhibit
Prohibit --uid/gid map and --pod for container create/run
2022-01-14 13:08:17 +01:00
6996830104 Prohibit --uid/gid map and --pod for container create/run
add a check in namespaceOptions() that ensures the user is not setting a new uid/gid map
if entering or creating a pod that has an infra container

resolves #12669

Signed-off-by: cdoern <cdoern@redhat.com>
2022-01-13 14:03:51 -05:00
eeb76db0fd Merge pull request #12642 from Luap99/libnetwork
use libnetwork from c/common
2022-01-13 18:06:54 +01:00
ab7228b3c2 Merge pull request #12836 from cdoern/podSysCtl
Podman Pod Create --sysctl support
2022-01-13 16:44:52 +01:00
f257d98394 Podman Pod Create --sysctl support
added support for pod wide sysctls. The sysctls supported are the same as the continer run controls.

These controls are only valid if the proper namespaces are shared within the pod, otherwise only the infra ctr gets the sysctl

resolves #12747

Signed-off-by: cdoern <cdoern@redhat.com>
2022-01-12 20:49:04 -05:00
0151e10b62 update buildah to latest and use new network stack
Make sure buildah uses the new network stack.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-01-12 17:40:12 +01:00
fde6ad6373 Add --noout option to prevent the output of ids
Fixes: https://github.com/containers/podman/issues/11515

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-12 08:32:42 -05:00
6e208c2226 add additional fields to podman machine ls --json
[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-11 16:42:56 -05:00