summaryrefslogtreecommitdiff
path: root/pkg/domain
Commit message (Collapse)AuthorAge
* Merge pull request #11707 from rhatdan/playOpenShift Merge Robot2021-10-01
|\ | | | | Add podman play kube --no-hosts options
| * Add podman play kube --no-hosts optionsDaniel J Walsh2021-10-01
| | | | | | | | | | | | | | | | | | This option will setup the containers to not modify their /etc/hosts file and just use the one from the image. Fixes: https://github.com/containers/podman/issues/9500 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #11686 from cdoern/podDeviceOptionsOpenShift Merge Robot2021-10-01
|\ \ | |/ |/| Pod Device-Read-BPS support
| * Pod Device-Read-BPS supportcdoern2021-09-28
| | | | | | | | | | | | | | | | | | added the option for the user to specify a rate, in bytes, at which they would like to be able to read from the device being added to the pod. This is the first in a line of pod device options. WARNING: changed pod name json tag to pod_name to avoid confusion when marshaling with the containerspec's name Signed-off-by: cdoern <cdoern@redhat.com>
* | Support selinux options with bind mounts play/genBrent Baude2021-09-30
| | | | | | | | | | | | | | | | | | | | | | | | When using play kube and generate kube, we need to support if bind mounts have selinux options. As kubernetes does not support selinux in this way, we tuck the selinux values into a pod annotation for generation of the kube yaml. Then on play, we check annotations to see if a value for the mount exists and apply it. Fixes BZ #1984081 Signed-off-by: Brent Baude <bbaude@redhat.com>
* | libpod: add GetConfigNoCopy()Valentin Rothberg2021-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new function to libpod to directly access the runtime configuration without creating an expensive deep copy. Further migrate a number of callers to this new function. This drops the number of calls to JSONDeepCopy from 4 to 1 in a simple `podman run --rm -d busybox top`. Future work: Please note that there are more callers of GetConfig() that can me migrated to GetConfigNoCopy(). [NO TESTS NEEDED] Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | image prune: support removing external containersValentin Rothberg2021-09-28
| | | | | | | | | | | | | | | | Support removing external containers (e.g., build containers) during image prune. Fixes: #11472 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | stop: Do nothing if container was never created in runtimeAditya Rajan2021-09-27
| | | | | | | | | | | | | | | | | | Following commit ensures we silently return container id on `stop` if container was never created in OCI runtime. Following behaviour ensures that we are in parity with docker. Signed-off-by: Aditya Rajan <arajan@redhat.com>
* | Set context dir for play kube buildBrent Baude2021-09-23
| | | | | | | | | | | | | | | | When performing an image build with play kube, we need to set the context directory so things like file copies have the correct input path. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | podman save: enforce signature removalValentin Rothberg2021-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Enforce the removal of signatures in `podman save` to restore behavior prior to the migration to libimage. We may consider improving on that in the future. For details, please refer to the excellent summary by @mtrmac [1]. [NO TESTS NEEDED] - manually verified but exisiting tests need some further investigation (see [1]). [1] https://github.com/containers/podman/pull/11669#issuecomment-925250264 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | Merge pull request #11704 from rhatdan/kubeOpenShift Merge Robot2021-09-23
|\ \ | | | | | | podman generate kube should not include images command
| * | podman generate kube should not include images commandDaniel J Walsh2021-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the command came from the underlying image, then we should not include it in the generate yaml file. Fixes: https://github.com/containers/podman/issues/11672 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | standardize logrus messages to upper caseDaniel J Walsh2021-09-22
|/ / | | | | | | | | | | | | | | Remove ERROR: Error stutter from logrus messages also. [ NO TESTS NEEDED] This is just code cleanup. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | podman save: add `--uncompressed`Valentin Rothberg2021-09-22
| | | | | | | | | | | | | | | | | | | | Add an option to `podman save` to allow uncompressed layers when copying OCI images. Do the neccessary plumbing for the remote client, add tests and vendor in the latest commit from c/common to fetch the neccessary changes in libimage. Closes: #11613 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | Add a backoff and retries to retrieving exited eventMatthew Heon2021-09-21
|/ | | | | | | | | | | | | | | | | | There's a potential race around extremely short-running containers and events with journald. Events may not be written for some time (small, but appreciable) after they are received, and as such we can fail to retrieve it if there is a sufficiently short time between us writing the event and trying to read it. Work around this by just retrying, with a 0.25 second delay between retries, up to 4 times. [NO TESTS NEEDED] because I have no idea how to reproduce this race in CI. Fixes #11633 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* Merge pull request #11662 from baude/kubenodevOpenShift Merge Robot2021-09-21
|\ | | | | Remove references to kube being development
| * Remove references to kube being developmentBrent Baude2021-09-20
| | | | | | | | | | | | | | | | | | | | At this point and even though we are always improving the play and generate kube functions, I would say it no longers needs to be denoted as under development. [NO TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* | Pod Device Supportcdoern2021-09-20
| | | | | | | | | | | | | | | | | | | | added support for pod devices. The device gets added to the infra container and recreated in all containers that join the pod. This required a new container config item to keep track of the original device passed in by the user before the path was parsed into the container device. Signed-off-by: cdoern <cdoern@redhat.com>
* | Merge pull request #11601 from cdoern/mapOptionsOpenShift Merge Robot2021-09-20
|\ \ | |/ |/| Created MapOptions for PodCreate
| * Created MapOptions for PodCreatecdoern2021-09-20
| | | | | | | | | | | | | | | | MapOptions take the pod and container create options, assigning matching values from infra back to the pod for the Libpod API. This function, unlike the previous one, does not require any manual additions when new options are added since it uses the structs JSON tags, this is a more modular approach. Signed-off-by: cdoern <cdoern@redhat.com>
* | remote untag: support digestsValentin Rothberg2021-09-20
| | | | | | | | | | | | | | | | | | Fix a bug when remotely untagging an image via tag@digest. The digest has been lost in the remote client and hence led to a wrong behaviour on the server. Fixes: #11557 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | Merge pull request #11606 from giuseppe/always-move-pause-process-to-scopeOpenShift Merge Robot2021-09-17
|\ \ | | | | | | runtime: move pause process to scope
| * | system: move MovePauseProcessToScope to utilsGiuseppe Scrivano2021-09-16
| | | | | | | | | | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
| * | system: always move pause process when running on systemdGiuseppe Scrivano2021-09-16
| | | | | | | | | | | | | | | | | | | | | when running on a systemd with systemd, always try to move the pause process to its own scope. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
| * | system: avoid reading pause pid fileGiuseppe Scrivano2021-09-16
| |/ | | | | | | | | | | | | we already know the path to the pause PID file, no need to calculate it again. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* / Do not allow network modes to be used as network namesPaul Holzinger2021-09-16
|/ | | | | | | | | `podman network create` should not allow users to create networks with a name which is already used for a network mode in `podman run --network`. Fixes #11448 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* Merge pull request #11322 from Luap99/network-libpodOpenShift Merge Robot2021-09-15
|\ | | | | Wire network interface into libpod
| * Drop OCICNI dependencyPaul Holzinger2021-09-15
| | | | | | | | | | | | | | | | | | | | | | We do not use the ocicni code anymore so let's get rid of it. Only the port struct is used but we can copy this into libpod network types so we can debloat the binary. The next step is to remove the OCICNI port mapping form the container config and use the better PortMapping struct everywhere. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * Wire network interface into libpodPaul Holzinger2021-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make use of the new network interface in libpod. This commit contains several breaking changes: - podman network create only outputs the new network name and not file path. - podman network ls shows the network driver instead of the cni version and plugins. - podman network inspect outputs the new network struct and not the cni conflist. - The bindings and libpod api endpoints have been changed to use the new network structure. The container network status is stored in a new field in the state. The status should be received with the new `c.getNetworkStatus`. This will migrate the old status to the new format. Therefore old containers should contine to work correctly in all cases even when network connect/ disconnect is used. New features: - podman network reload keeps the ip and mac for more than one network. - podman container restore keeps the ip and mac for more than one network. - The network create compat endpoint can now use more than one ipam config. The man pages and the swagger doc are updated to reflect the latest changes. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Merge pull request #11592 from Luap99/runlabel-nameOpenShift Merge Robot2021-09-15
|\ \ | |/ |/| container runlabel remove image tag from name
| * container runlabel remove image tag from namePaul Holzinger2021-09-15
| | | | | | | | | | | | | | | | | | | | | | When no name is given for podman container runlabel it will default to the image base name. However this can contain a tag. Since podman does not accept container names with a colon the run command will fail if it contains something like `podman run --name NAME ...`. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2004263 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Pod Volumes Supportcdoern2021-09-14
|/ | | | | | | | | added support for the --volume flag in pods using the new infra container design. users can specify all volume options they can with regular containers resolves #10379 Signed-off-by: cdoern <cdoern@redhat.com>
* Merge pull request #11529 from n1hility/fix-oldfieldsOpenShift Merge Robot2021-09-13
|\ | | | | Add deprecated event fields for 1.22+ clients that still expect them
| * Add deprecated fields for 1.22+ clients that still expect themJason T. Greene2021-09-10
| | | | | | | | Signed-off-by: Jason Greene <jason.greene@redhat.com>
* | Add init containers to generate and play kubeUrvashi Mohnani2021-09-10
|/ | | | | | | | | | | | | | | Kubernetes has a concept of init containers that run and exit before the regular containers in a pod are started. We added init containers to podman pods as well. This patch adds support for generating init containers in the kube yaml when a pod we are converting had init containers. When playing a kube yaml, it detects an init container and creates such a container in podman accordingly. Note, only init containers created with the init type set to "always" will be generated as the "once" option deletes the init container after it has run and exited. Play kube will always creates init containers with the "always" init container type. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
* Merge pull request #11447 from chenzhiwei/respect-configOpenShift Merge Robot2021-09-09
|\ | | | | fix play kube can't use infra_image in config file
| * fix play kube can't use infra_image in config fileChen Zhiwei2021-09-08
| | | | | | | | Signed-off-by: Chen Zhiwei <zhiweik@gmail.com>
* | Merge pull request #11476 from vrothberg/fix-11392OpenShift Merge Robot2021-09-08
|\ \ | | | | | | container inspect: improve error handling
| * | container inspect: improve error handlingValentin Rothberg2021-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve the error handling of `container inspect` to properly handle when the container has been removed _between_ the lookup and the inspect. That will yield the correct "no such object" error message in `inspect`. [NO TESTS NEEDED] since I do not know have a reliable and cheap reproducer. It's fixing a CI flake, so there's already an indicator. Fixes: #11392 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #11468 from Luap99/play-kube-slirpOpenShift Merge Robot2021-09-08
|\ \ \ | |/ / |/| | fix play kube --network options
| * | fix play kube --network optionsPaul Holzinger2021-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 092902b45555 introduced advanced network options for podman play kube. However this never worked because it unconditionally set the network mode to bridge after it parsed the network option. Added a test to ensure the correct mode is set. Truly fixes #10807 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Merge pull request #11431 from jmguzik/secrets-ls-filtersOpenShift Merge Robot2021-09-07
|\ \ \ | | | | | | | | Add filtering functionality to http api secrets list
| * | | Add filtering functionality to http api secrets listJakub Guzik2021-09-03
| | |/ | |/| | | | | | | | | | | | | | | | | | | Filtering is missing in both compat API and libpod API, while docker has filtering functinality. This commit enables filtering option using name and id in both libpod and http API. Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
* | | Merge pull request #11427 from flouthoc/kube-pod-logsOpenShift Merge Robot2021-09-07
|\ \ \ | |_|/ |/| | kube: Add support for `podman pod logs`.
| * | kube: Add support for podman pod logsAditya Rajan2021-09-05
| |/ | | | | | | | | | | | | | | | | | | | | Following PR adds support for `kubectl` like `pod logs` to podman. Usage `podman pod logs <podIDorName` gives a stream of logs for all the containers within the pod with **containername** as a field. Just like **`kubectl`** also supports `podman pod logs -c ctrIDorName podIDorName` to limit the log stream to any of the specificied container which belongs to pod. Signed-off-by: Aditya Rajan <arajan@redhat.com>
* / generate systemd: handle --restartValentin Rothberg2021-09-07
|/ | | | | | | | | Handle custom restart policies of containers when generating the unit files; those should be set on the unit level and removed from ExecStart flags. Fixes: #11438 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* manifest: rm should not remove referenced images.Aditya Rajan2021-09-02
| | | | | | | | | | Following PR makes sure that `podman manifest rm <list>` only removes the named manifest list and not referenced images. Bumping and squashing c/common to v0.43.3-0.20210902095222-a7acc160fb25 in same commit in order to make sure build commit test passes. Signed-off-by: Aditya Rajan <arajan@redhat.com>
* podman stop always cleanupPaul Holzinger2021-09-01
| | | | | | | | | | | | | | | When a container is configured for auto removal podman stop should still do cleanup, there is no guarantee the the cleanup process spawned by conmon will be successful. Also a user expects after podman stop that the network/mounts are cleaned up. Therefore podman stop should not return early and instead do the cleanup and ignore errors if the container was already removed. [NO TESTS NEEDED] I don't know how to test this. Fixes #11384 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* InfraContainer Reworkcdoern2021-08-26
| | | | | | | | | | InfraContainer should go through the same creation process as regular containers. This change was from the cmd level down, involving new container CLI opts and specgen creating functions. What now happens is that both container and pod cli options are populated in cmd and used to create a podSpecgen and a containerSpecgen. The process then goes as follows FillOutSpecGen (infra) -> MapSpec (podOpts -> infraOpts) -> PodCreate -> MakePod -> createPodOptions -> NewPod -> CompleteSpec (infra) -> MakeContainer -> NewContainer -> newContainer -> AddInfra (to pod state) Signed-off-by: cdoern <cdoern@redhat.com>
* Merge pull request #11298 from baude/kubeupdownOpenShift Merge Robot2021-08-26
|\ | | | | teardown play kube