aboutsummaryrefslogtreecommitdiff
path: root/pkg
Commit message (Collapse)AuthorAge
* Merge pull request #14281 from vrothberg/fix-14251OpenShift Merge Robot2022-05-23
|\ | | | | fix --init with /dev bind mount
| * fix --init with /dev bind mountValentin Rothberg2022-05-23
| | | | | | | | | | | | | | | | | | | | The init binary until now has been bind-mounted to /dev/init which breaks when bind-mounting to /dev. Instead mount the init to /run/podman-init. The reasoning for using /run is that it is already used for other runtime data such as secrets. Fixes: #14251 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | Merge pull request #14292 from vrothberg/fix-14283OpenShift Merge Robot2022-05-23
|\ \ | | | | | | auto update: create an event
| * | auto update: create an eventValentin Rothberg2022-05-23
| |/ | | | | | | | | | | | | | | | | Create an auto-update event for each invocation, independent if images and containers are updated or not. Those events will be indicated in the events already but users will now know why. Fixes: #14283 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | Merge pull request #14266 from tupyy/add-blockdevice-play-kubeOpenShift Merge Robot2022-05-23
|\ \ | |/ |/| Expose block and character devices with play kube
| * add tests and fix bug when char device pass the test as block deviceCosmin Tupangiu2022-05-18
| | | | | | | | | | | | | | | | | | | | | | - add test - fix bug when a character device set in a volume as a block device is seen as block device in _pkg/specgen/generate/kube/volume.go_. At this stage the type does not matter much because the devices are recreated at lower layer but the bug allowed a CharDevice volume to be passed to lower layer as a BlockDevice. Signed-off-by: Cosmin Tupangiu <cosmin@redhat.com>
| * expose block and char devices with play kubeCosmin Tupangiu2022-05-17
| | | | | | | | | | | | [NO NEW TESTS NEEDED] Signed-off-by: Cosmin Tupangiu <cosmin@redhat.com>
* | Swagger refactor/cleanupJhon Honce2022-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove duplicate or unused types and constants * Move all documetation-only models and responses into swagger package * Remove all unecessary names, go-swagger will determine names from struct declarations * Use Libpod suffix to differentiate between compat and libpod models and responses. Taken from swagger:operation declarations. * Models and responses that start with lowercase are for swagger use only while uppercase are used "as is" in the code and swagger comments * Used gofumpt on new code ```release-note ``` Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Merge pull request #14288 from vrothberg/lintersOpenShift Merge Robot2022-05-19
|\ \ | | | | | | linter: enable unconvert linter
| * | linter: enable unconvert linterValentin Rothberg2022-05-19
| | | | | | | | | | | | | | | | | | | | | Detects unneccessary type conversions and helps in keeping the code base cleaner. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | | Merge pull request #13870 from kolyshkin/makefile-cleanupsOpenShift Merge Robot2022-05-19
|\ \ \ | |/ / |/| | Makefile: simplify for modern Go
| * | Remove GO111MODULES useKir Kolyshkin2022-05-17
| | | | | | | | | | | | | | | | | | Using it is no longer needed. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
* | | Merge pull request #14228 from rhatdan/apiOpenShift Merge Robot2022-05-18
|\ \ \ | | | | | | | | Deleting an n use image should return conflict not system error
| * | | Deleting an n use image should return conflict not system errorDaniel J Walsh2022-05-16
| | |/ | |/| | | | | | | | | | | | | Fixes: https://github.com/containers/podman/issues/14208 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #14256 from vrothberg/run-1287OpenShift Merge Robot2022-05-18
|\ \ \ | |_|/ |/| | k8systemd: run k8s workloads in systemd
| * | k8systemd: run k8s workloads in systemdValentin Rothberg2022-05-17
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support running `podman play kube` in systemd by exploiting the previously added "service containers". During `play kube`, a service container is started before all the pods and containers, and is stopped last. The service container communicates its conmon PID via sdnotify. Add a new systemd template to dispatch such k8s workloads. The argument of the template is the path to the k8s file. Note that the path must be escaped for systemd not to bark: Let's assume we have a `top.yaml` file in the home directory: ``` $ escaped=$(systemd-escape ~/top.yaml) $ systemctl --user start podman-play-kube@$escaped.service ``` Closes: https://issues.redhat.com/browse/RUN-1287 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | Merge pull request #14254 from flouthoc/api-allow-remoteOpenShift Merge Robot2022-05-17
|\ \ | |/ |/| api: make no-op `remote` functional in `/libpod/build`
| * api: make no-op remote functional in /libpod/buildAditya R2022-05-16
| | | | | | | | | | | | | | | | | | | | | | Podman API `libpod/build` accepts paramemter `remote` which overrides `dockerfile` but currently parameter is no-op. Following commit adds support for `remote` parameter in libpod API. See: https://docs.podman.io/en/v3.2.3/_static/api.html#operation/ImageBuildLibpod Closes: https://github.com/containers/podman/issues/13831 Signed-off-by: Aditya R <arajan@redhat.com>
* | Merge pull request #14250 from n1hility/wsl-lingerOpenShift Merge Robot2022-05-16
|\ \ | | | | | | Update WSL machine OS to enable user lingering
| * | Update WSL machine OS to enable user lingeringJason T. Greene2022-05-15
| |/ | | | | | | | | | | Also migrate old machines that were missing this setting Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* / [BZ #2083997] pod: build pause image in custom user NSValentin Rothberg2022-05-13
|/ | | | | | | | | | | Use the host UID and host GID mapping when building the local pause image for a Pod with a custom mapping. Otherwise, the mappings are off and the build fails. Propagating the mapping to the build container is not needed since the pause image ships merely a copied `catatonit` from the host. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2083997 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* Add support for machine events on WindowsJason T. Greene2022-05-12
| | | | Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* play kube: service containerValentin Rothberg2022-05-12
| | | | | | | | | | | | | | | | | | | | Add the notion of a "service container" to play kube. A service container is started before the pods in play kube and is (reverse) linked to them. The service container is stopped/removed *after* all pods it is associated with are stopped/removed. In other words, a service container tracks the entire life cycle of a service started via `podman play kube`. This is required to enable `play kube` in a systemd unit file. The service container is only used when the `--service-container` flag is set on the CLI. This flag has been marked as hidden as it is not meant to be used outside the context of `play kube`. It is further not supported on the remote client. The wiring with systemd will be done in a later commit. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* Merge pull request #14170 from ashley-cui/machtestsOpenShift Merge Robot2022-05-11
|\ | | | | Add more machine tests
| * Add more machine testsAshley Cui2022-05-10
| | | | | | | | | | | | Add more machine tests for flags in init, inspect, and list. Signed-off-by: Ashley Cui <acui@redhat.com>
* | kube: add support for --userns=Giuseppe Scrivano2022-05-10
| | | | | | | | | | | | | | | | add support to override the user namespace to use for the pod. Closes: https://github.com/containers/podman/issues/7504 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | kube: honor pod security context IDsGiuseppe Scrivano2022-05-10
| | | | | | | | | | | | | | | | If the RunAsUser, RunAsGroup, SupplementalGroups settings are not overriden in the container security context, then take the value from the pod security context. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | kube: refactor setupSecurityContext to accept directly the security ctxGiuseppe Scrivano2022-05-10
|/ | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Merge pull request #14121 from cdoern/kubeOpenShift Merge Robot2022-05-09
|\ | | | | play kube log tag handling
| * play kube log tag handlingcdoern2022-05-06
| | | | | | | | | | | | | | | | | | currently tags cause a panic due to an uninitialized map. Initialize the map and add parsing to make sure we are only tagging with journald resolves #13356 Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | libpod: add c.ConfigWithNetworks()Paul Holzinger2022-05-06
| | | | | | | | | | | | | | | | | | | | Reading the networks requires an extra db operation. Most c.Config() callers do not need them so create a new function which returns the config with networks. [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Merge pull request #14129 from Juneezee/test/t.TempDirOpenShift Merge Robot2022-05-06
|\ \ | | | | | | test: use `T.TempDir` to create temporary test directory
| * | test: use `T.TempDir` to create temporary test directoryEng Zer Jun2022-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit replaces `ioutil.TempDir` with `t.TempDir` in tests. The directory created by `t.TempDir` is automatically removed when the test and all its subtests complete. Prior to this commit, temporary directory created using `ioutil.TempDir` needs to be removed manually by calling `os.RemoveAll`, which is omitted in some tests. The error handling boilerplate e.g. defer func() { if err := os.RemoveAll(dir); err != nil { t.Fatal(err) } } is also tedious, but `t.TempDir` handles this for us nicely. Reference: https://pkg.go.dev/testing#T.TempDir Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* | | Merge pull request #14118 from rhatdan/VENDOROpenShift Merge Robot2022-05-05
|\ \ \ | | | | | | | | Vendor in containers/buildah@v1.26.1
| * | | Vendor in containers/buildah@v1.26.1Daniel J Walsh2022-05-05
| | | | | | | | | | | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | Merge pull request #14098 from Luap99/test-toolsOpenShift Merge Robot2022-05-05
|\ \ \ \ | | | | | | | | | | vendor test dependencies instead of installing via network
| * | | | vendor test tools in submodulePaul Holzinger2022-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using the main module we should vendor the test tools in a different directory. That way we do not add extra dependencies to the main module which can be problemetic for packages or other users. This is already done in buildah so this makes us more consitent. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | | | Merge pull request #14059 from cdoern/cloneOpenShift Merge Robot2022-05-05
|\ \ \ \ \ | |_|/ / / |/| | | | pass networks to container clone
| * | | | pass networks to container clonecdoern2022-05-03
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | since the network config is a string map, json.unmarshal does not recognize the config and spec as the same entity, need to map this option manually resolves #13713 Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | | | Merge pull request #14037 from rhatdan/remoteuriOpenShift Merge Robot2022-05-04
|\ \ \ \ | | | | | | | | | | Report correct RemoteURI
| * | | | Report correct RemoteURIDaniel J Walsh2022-05-04
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than assuming a filesystem path, the API service URI is recorded in the libpod runtime configuration and then reported as requested. Note: All schemes other than "unix" are hard-coded to report URI exists. Fixes #12023 Signed-off-by: Jhon Honce <jhonce@redhat.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | Merge pull request #14095 from baude/moreunittestsOpenShift Merge Robot2022-05-04
|\ \ \ \ | | | | | | | | | | Add more unit tests
| * | | | Add more unit testsBrent Baude2022-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve "code coverage" with more unit-tests. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | | | Merge pull request #14066 from ashley-cui/sysresOpenShift Merge Robot2022-05-04
|\ \ \ \ \ | |_|/ / / |/| | | | podman system reset removed machines incorrectly
| * | | | podman system reset removed machines incorrectlyAshley Cui2022-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | podman system reset did not clean up machines fully, leaving some config files, and breaking machines. Now it removes all machines files fully. Signed-off-by: Ashley Cui <acui@redhat.com>
* | | | | Merge pull request #14060 from nicrowe00/13781OpenShift Merge Robot2022-05-04
|\ \ \ \ \ | |_|/ / / |/| | | | play kube default log driver
| * | | | play kube default log driverNiall Crowe2022-05-04
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default log driver is not used when using play kube without --log-driver. The LogDriver function needs to be called in order to use the default log driver. fixes #13781 Signed-off-by: Niall Crowe <nicrowe@redhat.com>
* / | | Implement --format for machine inspectJhon Honce2022-05-03
|/ / / | | | | | | | | | | | | | | | * Fix issue of nil pointer derefence Signed-off-by: Jhon Honce <jhonce@redhat.com>
* / / generate systemd: pods: set exit policyValentin Rothberg2022-05-03
|/ / | | | | | | | | | | | | | | | | | | Unless specified in the create command of the pod, enforce the exit policy to "stop". With "stop", a pod is stopped when the last container exits and does not continue running. This behavior integrates much better into systemd which is now able to tell whether the service running as pod is actually running/active or not. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | Merge pull request #13859 from vrothberg/fix-13464OpenShift Merge Robot2022-05-02
|\ \ | | | | | | pod: add exit policies