summaryrefslogtreecommitdiff
path: root/pkg
Commit message (Collapse)AuthorAge
* 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
| * | pod: add exit policiesValentin Rothberg2022-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the notion of an "exit policy" to a pod. This policy controls the behaviour when the last container of pod exits. Initially, there are two policies: - "continue" : the pod continues running. This is the default policy when creating a pod. - "stop" : stop the pod when the last container exits. This is the default behaviour for `play kube`. In order to implement the deferred stop of a pod, add a worker queue to the libpod runtime. The queue will pick up work items and in this case helps resolve dead locks that would otherwise occur if we attempted to stop a pod during container cleanup. Note that the default restart policy of `play kube` is "Always". Hence, in order to really solve #13464, the YAML files must set a custom restart policy; the tests use "OnFailure". Fixes: #13464 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | | Implement machine inspect for WSLJason T. Greene2022-05-01
|/ / | | | | | | Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* | pkg/api: do not register decoder in endpoint handlerPaul Holzinger2022-04-29
| | | | | | | | | | | | | | | | | | | | | | | | Since the decoder is shared registering the decoder inside a single endpoint will also register it for all others. Also the problem with that is the it will register it everytime this endpoint is called which is wrong. Instead we should register it once like the other custom decoder functions. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | enable errcheck linterPaul Holzinger2022-04-29
|/ | | | | | | | The errcheck linter makes sure that errors are always check and not ignored by accident. It spotted a lot of unchecked errors, mostly in the tests but also some real problem in the code. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* Merge pull request #14033 from baude/inspectredoOpenShift Merge Robot2022-04-28
|\ | | | | Refactor machine inspect
| * Refactor machine inspectBrent Baude2022-04-28
| | | | | | | | | | | | | | | | | | | | I was asked to refactor machine inspect output to represent more common and basic information. machine inspect now has information that would be appropriate for different machines. [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* | Merge pull request #14024 from cdoern/machineOpenShift Merge Robot2022-04-28
|\ \ | |/ |/| podman machine starting test
| * podman machine starting testcdoern2022-04-27
| | | | | | | | | | | | | | | | | | | | | | | | add a test to make sure machines are not running while still starting in order to do this, I added a parameter to `run()` to delineate whether or not the command should block or not. The non blocking run allows for tests to get and use the `machineSession` pointer and check the exit code to see if it has finished. also fix a bug (created by #13996) that before started, the machines would always say "LastUp" and "Created" Less than one second ago Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | Merge pull request #14051 from giuseppe/volume-create-noquota-optionOpenShift Merge Robot2022-04-28
|\ \ | | | | | | volume: add new option -o o=noquota
| * | volume: add new option -o o=noquotaGiuseppe Scrivano2022-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add a new option to completely disable xfs quota usage for a volume. xfs quota set on a volume, even just for tracking disk usage, can cause weird errors if the volume is later re-used by a container with a different quota projid. More specifically, link(2) and rename(2) might fail with EXDEV if the source file has a projid that is different from the parent directory. To prevent such kind of issues, the volume should be created beforehand with `podman volume create -o o=noquota $ID` Closes: https://github.com/containers/podman/issues/14049 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | Produce better test error messagesBrent Baude2022-04-27
| | | | | | | | | | | | | | | | | | | | | As Ed has pointed out, the form of Expect(session).To(Exit(0)) provides much better error messages. Let's make Ed happy. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | Merge pull request #13953 from ashley-cui/machOpenShift Merge Robot2022-04-27
|\ \ \ | |/ / |/| | Allow changing of CPUs, Memory, and Disk Size
| * | Allow changing of CPUs, Memory, and Disk SizeAshley Cui2022-04-27
| |/ | | | | | | | | | | | | | | | | Allow podman machine set to change CPUs, Memory and Disk size of a QEMU machine after its been created. Disk size can only be increased. If one setting fails to be changed, the other settings will still be applied. Signed-off-by: Ashley Cui <acui@redhat.com>
* | Merge pull request #13698 from Luap99/versionOpenShift Merge Robot2022-04-27
|\ \ | | | | | | Bump version to v4.1.0-dev
| * | manifest endpoints fix orderingPaul Holzinger2022-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OK this is a pretty bad design IMO. We have to endpoints: manifest create: `POST /{name}` manifest push: `POST /{name}/registry/{destination}` So basically all push requests are valid create requests. Fortunately we can change the order in which the endpoints are matched. If the logic matches push first it will fall back to create if the request does not have the `/registry/{}` part. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | pkg/bindings: manifest remove 3.X API support conditionalPaul Holzinger2022-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since the minimum API version is set to 4.0.0 the endpoint will not talk to the 3.X endpoint. Therefore this logic is broken and should just be removed. 4.0 bindings should only talk to 4.0 server. This is already the case for many other endpoints. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | fix manifest modify endpoint to respect tlsverify paramPaul Holzinger2022-04-27
| | | | | | | | | | | | Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | Bump version to v4.1.0-devPaul Holzinger2022-04-27
| | | | | | | | | | | | | | | | | | | | | | | | I think we forgot to bump the version in the main branch. It should be v4.1.0-dev now. Also set the min api version to 4.0.0 as on the podman 4.0 branch. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Merge pull request #14023 from rhatdan/kubeOpenShift Merge Robot2022-04-27
|\ \ \ | | | | | | | | Truncate annotations when generating kubernetes yaml files
| * | | Truncate annotations when generating kubernetes yaml filesDaniel J Walsh2022-04-27
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kubernetes only allows 63 characters in an annotation. Make sure that we only add 63 or less charaters when generating kube. Warn if containers or pods have longer length and truncate. Discussion: https://github.com/containers/podman/discussions/13901 Fixes: https://github.com/containers/podman/issues/13962 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | play kube respect hostNetworkPaul Holzinger2022-04-27
| |/ |/| | | | | | | | | | | | | | | | | | | We need to use the host network when it is set in the config and --network was not used. This regression was added in 3e9af2029f1f. Fixes #14015 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Merge pull request #13997 from Luap99/gocriticOpenShift Merge Robot2022-04-27
|\ \ | |/ |/| enable gocritic linter
| * play kube: do not skip containers by namePaul Holzinger2022-04-26
| | | | | | | | | | | | | | | | We should not exclude contianers by name. If a users has a container with the name "inf" it is currently skipped. This is wrong. The k8s yaml does not contain infra containers so we do not have to skip them. Signed-off-by: Paul Holzinger <pholzing@redhat.com>