summaryrefslogtreecommitdiff
path: root/pkg
Commit message (Collapse)AuthorAge
* import: allow users to set os, arch and variant of importsAditya R2022-03-23
| | | | | | | | | | Allows users to set `--os` , `--arch` and `--variant` of the image created from the custom import. Following is useful when user is already aware of the values which are correct for their generated rootfs Signed-off-by: Aditya R <arajan@redhat.com>
* Merge pull request #13573 from vrothberg/golangci-lintOpenShift Merge Robot2022-03-21
|\ | | | | bump golangci-lint to v1.45.0
| * bump golangci-lint to v1.45.0Valentin Rothberg2022-03-21
| | | | | | | | | | | | | | | | | | | | * supports Go 1.18 * disable a number of new linters * fix minor stylecheck issues [NO NEW TESTS NEEDED] Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | podman rmi --ignoreValentin Rothberg2022-03-19
|/ | | | | | | | | | | Add an `--ignore` flag to `podman image rm` to instruct ignoring image if a specified image does not exist and to not throw an error. Other commands (e.g., `podman container rm`) already support this flag. Such an `--ignore` flag can come in handy in clean-up scripcts such as the teardown phases in the Podman tests. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* Merge pull request #13523 from n1hility/tolerate-old-machineOpenShift Merge Robot2022-03-18
|\ | | | | Tolerate old machine images, but warn they should be recreated
| * Handle incompatible machinesJason T. Greene2022-03-18
| | | | | | | | | | | | Start in a reduced mode for recovery, warn, and provide instructions to recreate them Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* | go fmt: use go 1.18 conditional-build syntaxValentin Rothberg2022-03-18
|/ | | | Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* Merge pull request #13530 from vrothberg/fix-13529OpenShift Merge Robot2022-03-17
|\ | | | | podman create: building local pause image: do not read ignore files
| * podman create: building local pause image: do not read ignore filesValentin Rothberg2022-03-17
| | | | | | | | | | | | | | | | | | Make sure to ignore local {container,docker}ignore files when building a local pause image. Otherwise, we may mistakenly not be able to copy catatonit into the build container. Fixes: #13529 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | Merge pull request #13527 from machacekondra/set_raw_image_name_for_play_kubeOpenShift Merge Robot2022-03-17
|\ \ | | | | | | Set rawimage for containers created via play kube
| * | Set rawimage for containers created via play kubeOndra Machacek2022-03-16
| |/ | | | | | | | | | | | | | | | | | | | | | | | | This commit set the containers RawImageName to default image name specified in Pod YAML, so the containers could be used via autoupdate feature, which needs the RawImageName to be set. Currently RawImageName is set only for the create/run/clone podman commands. [NO NEW TESTS NEEDED] Signed-off-by: Ondra Machacek <omachace@redhat.com>
* / Separator is no longer prepended when prefix is empty on podman generate systemdNirmal Patel2022-03-16
|/ | | | | | | | | | | | | | When podman generate systemd is invoked, it previously did not check if container-prefix or pod-prefix are empty. When these are empty, the file name starts with the separator, which is hyphen by default. This results in files like '-containername.service'. The code now checks if these prefixes are empty. If they are, the filename no longer adds a separator. Instead, it uses name or ID of the container or pod. Closes #13272 Signed-off-by: Nirmal Patel <npate012@gmail.com>
* Merge pull request #13489 from Luap99/k8sOpenShift Merge Robot2022-03-16
|\ | | | | move k8s deps into podman
| * pkg/k8s.io: add small readme with copyright noticePaul Holzinger2022-03-15
| | | | | | | | Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * pkg/k8s.io/api/core/v1: remove unneeded typesPaul Holzinger2022-03-15
| | | | | | | | | | | | | | | | Remove types that are not applicable for podman. This are types I do not think we need, there is definitely more that could be removed but this should be handled by someone who knows the k8s code better than me. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * pkg/k8s.io/...: remove more unneeded filesPaul Holzinger2022-03-15
| | | | | | | | | | | | We do not use the types defined in these fields. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * pkg/k8s.io/...: remove protobuf field tagsPaul Holzinger2022-03-15
| | | | | | | | | | | | | | | | | | | | | | Since we do not use protobuf we can remove these field tags. This will save some KB in the final binary size. This change was automated with the following commands: find pkg/k8s.io/ -type f -name "*.go" -exec sed -i -e 's/\sprotobuf\:\".*\"//g' {} + find pkg/k8s.io/ -type f -name "*.go" -exec sed -i -e 's/\s`protobuf\:\".*\"`//g' {} + Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * pkg/k8s.io/...: fix lint errorsPaul Holzinger2022-03-15
| | | | | | | | | | | | | | | | | | | | | | Fix linting errors. We use different/stricter linters, instead of skipping these packages we should fix it. Most errors are about naming conventions, since I do not want to change the names I added the nolint comment there. I also removed some unused fields where the linter complained. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * remove unneeded k8s codePaul Holzinger2022-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a lot of unneeded code, k8s is the by far the biggest dependency in podman. We should remove as much as possible so that we only have the stuff left that we use. This is just a quick skim over the code which removes a lot of the generated code and many packages that are now unused. I know that this will be impossible to properly review. I will try to make smaller changes in follow up work. Right now this reduces about 8 MB in binary size!!! [NO NEW TESTS NEEDED] Hopefully existing tests will catch any problems. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * move k8s deps into podmanPaul Holzinger2022-03-15
| | | | | | | | | | | | | | | | We only need a small part of the k8s dependencies but they are the biggest dependencies in podman by far. Moving them into podman allows us to remove the unnecessary parts. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | fix breaking change in pkg/bindingsPaul Holzinger2022-03-15
|/ | | | | | | | | | | | | | | pkg/bindings is considered stable. We cannot make changes that would break any users. If someone uses this field their code would fail to compile. Since the fix is obviously correct we will keep it but also add the old field back in to keep compatibility with old code. When both fields are set ImportArchive is preferred over ImportAchive. Fixes changes from commit 217197340c8f [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* Merge pull request #13499 from rst0git/fix-typoOpenShift Merge Robot2022-03-14
|\ | | | | Fix typo
| * Fix typoRadostin Stoyanov2022-03-14
| | | | | | | | | | | | [NO NEW TESTS NEEDED] Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
* | Add support for --chrootdirsLStandman2022-03-14
|/ | | | Signed-off-by: LStandman <65296484+LStandman@users.noreply.github.com>
* Fixes TTY & resizing on Mac and WindowsJason T. Greene2022-03-12
| | | | Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* Add podman play kube --annotationDaniel J Walsh2022-03-09
| | | | | | | | | | Allow users to add annotions in the podman play kube command. This PR Also fixes the fact that annotations in the pod spec were not being passed down to containers. Fixes: https://github.com/containers/podman/issues/12968 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #12913 from rhatdan/kubeOpenShift Merge Robot2022-03-09
|\ | | | | Add --context-dir option to podman play kube
| * Add --context-dir option to podman play kubeDaniel J Walsh2022-03-01
| | | | | | | | | | | | | | | | | | | | This option was requested so that users could specify alternate locations to find context directories for each image build. It requites the --build option to be set. Partion Fix: https://github.com/containers/podman/issues/12485 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #13471 from Luap99/bump-mpbv7OpenShift Merge Robot2022-03-09
|\ \ | | | | | | Use github.com/vbauerster/mpb/v7 in pkg/machine
| * | Use github.com/vbauerster/mpb/v7 in pkg/machinePaul Holzinger2022-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already use v7 in c/image so podman should use the same version to prevent duplication. This saves 170 KB binary size. [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Merge pull request #13470 from Luap99/yamlv2OpenShift Merge Robot2022-03-09
|\ \ \ | |/ / |/| | use gopkg.in/yaml.v2 instead of v3
| * | use gopkg.in/yaml.v2 instead of v3Paul Holzinger2022-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many dependencies already import gopkg.in/yaml.v2, podman is the only user of the v3 version except github.com/stretchr/testify but this is only a testing dependency so it will not end up in the binary. This change reduces the podman binary size from 54740 to 54260 KB on my system. [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Merge pull request #13421 from hshiina/device-ruleOpenShift Merge Robot2022-03-09
|\ \ \ | | | | | | | | Set default rule at the head of device configuration
| * | | Set default rule at the head of device configurationHironori Shiina2022-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default rule should be set at the head of device configuration. Otherwise, rules for user devices are overridden by the default rule so that any access to the user devices are denied. Signed-off-by: Hironori Shiina <shiina.hironori@jp.fujitsu.com>
* | | | Merge pull request #13465 from n1hility/improve-install-msgOpenShift Merge Robot2022-03-09
|\ \ \ \ | |_|/ / |/| | | Improve agent install message to add restart instructions
| * | | Improve agent install message to add restart instructionsJason T. Greene2022-03-08
| |/ / | | | | | | | | | Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* / / machine rm -f stops and removes machineBrent Baude2022-03-08
|/ / | | | | | | | | | | | | | | | | | | | | | | If you want to remove a running machine, you can now pass the --force/-f to podman machine rm and the machine will be stopped and removed without confirmations. Fixes: #13448 [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* | Merge pull request #13409 from baude/virtfsdarwinOpenShift Merge Robot2022-03-07
|\ \ | | | | | | MacOS improvements
| * | MacOS improvementsBrent Baude2022-03-07
| | | | | | | | | | | | | | | | | | | | | | | | * Enable support of virtfs in Podman and darwin. At the time of this writing, it requires a special patch not yet included in upstream qemu. * Prefer to use a specially built qemu to support virtfs. The qemu is installed under libexec/podman. [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | Merge pull request #13414 from rvandernoort/exec_delayOpenShift Merge Robot2022-03-07
|\ \ \ | |/ / |/| | Add ExitCommandDelay configuration use in API exec handler
| * | Add ExitCommandDelay configuration use in API exec handlerRover van der Noort2022-03-04
| | | | | | | | | | | | | | | | | | [NO NEW TESTS NEEDED] Signed-off-by: Rover van der Noort <s.r.vandernoort@student.tudelft.nl>
* | | Merge pull request #13442 from tricktron/rm-mounted-host-socket-on-macosOpenShift Merge Robot2022-03-07
|\ \ \ | | | | | | | | `podman machine rm` removes the mounted socket file on macOS
| * | | Fixes: #13301 ("machine rm removes the mounted socket file on macos")Thibault Gagnaux2022-03-06
| |/ / | | | | | | | | | | | | [NO NEW TESTS NEEDED] Signed-off-by: Thibault Gagnaux <tgagnaux@gmail.com>
* / / Throw an error if kube yaml has duplicate ctr namesUrvashi Mohnani2022-03-04
|/ / | | | | | | | | | | | | Error out if the kube yaml passed to play kube has more than one container or init container with the same name. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
* / Revert "use GetRuntimeDir() from c/common"Brent Baude2022-03-01
|/ | | | | | | | This reverts commit fc5cf812c81a10f8a021aae11df5f12ab2a6f6f6. [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* Add podman volume mount supportDaniel J Walsh2022-02-28
| | | | | | Fixes: https://github.com/containers/podman/issues/12768 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #13325 from xordspar0/configmap-error-msgOpenShift Merge Robot2022-02-24
|\ | | | | Improve the error message for usused configMaps
| * Improve the error message for usused configMapsJordan Christiansen2022-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge pull request #13157 from ydayagi/mainOpenShift Merge Robot2022-02-23
|\ \ | | | | | | play kube: set defaults to container resources
| * | play kube: set defaults to container resourcesYaron Dayagi2022-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this fixes https://github.com/containers/podman/issues/13115 the change tries to immitate k8s behavior. when limits are not set the container's limits are all CPU and all RAM when requests are missing then they are equal to limits Signed-off-by: Yaron Dayagi <ydayagi@redhat.com>