summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* pkg/bindings/images/rm.go: remove redundant FIXMEValentin Rothberg2022-05-24
| | | | | | The Remove endpoint is being tested in the meantime. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* pkg/bindings/images: remove TODOs re: system contextValentin Rothberg2022-05-24
| | | | | | | | | A global system context does not make sense for the _bindings_, so remove the TODOs. [NO TESTS NEEDED] Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* autocomplete `podman search --filter`Valentin Rothberg2022-05-24
| | | | Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* contain_top_linux.go: s/TODO/NOTE/Valentin Rothberg2022-05-24
| | | | | | | Change the TODO note to NOTE to actually reflect what it is: breadcrumbs in case we want to add filtering the future. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* Merge pull request #14294 from vrothberg/fix-14291OpenShift Merge Robot2022-05-24
|\ | | | | fix compat image resolution
| * fix compat image resolutionValentin Rothberg2022-05-23
| | | | | | | | | | | | | | | | | | | | | | | | Fix a bug in the resolution of images in the Docker compat API. When looking up an image by a short name, the name may match an image that does not live on Docker Hub. The resolved name should be used for normalization instead of the input name to make sure that `busybox` can resolve to `registry.com/busybox` if present in the local storage. Fixes: #14291 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | Merge pull request #14263 from Luap99/completionOpenShift Merge Robot2022-05-23
|\ \ | | | | | | shell completion --format: various improvements
| * | shell completion --format: add help to function with argsPaul Holzinger2022-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From a template users POV it is not importent when they use a struct field or method. They only notice the difference when the function requires arguments. So lets be nice and let the user know that this method requires arguments via the help text. This is how it now looks like when the completion descriptions are enabled on bash: ``` $ bin/podman ps --format {{.Created.A {{.Created.AddDate (This is a function and requires 3 arguments) {{.Created.After (This is a function and requires 1 argument) {{.Created.Add (This is a function and requires 1 argument) {{.Created.AppendFormat (This is a function and requires 2 arguments) ``` Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | shell completion --format: support maps and functionsPaul Holzinger2022-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we only support structs in a template string like this: `{{.var1.test.` -> this meams that test must be a struct field on var1. Now with this var1 and test could also be either a map or function which returns a struct. A actual example: `podman container inspect --format {{.NetworkSettings.Networks.netname.` Now we can complete the struct fileds after netname. Note that this cannot complete map keys since they are empty by default, so it is impossible to get them in the completion logic. Also this fixes a panic with embeeded nil structs Fixes #14223 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | shell completion --format: fix embedded struct handlingPaul Holzinger2022-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a struct is embeeded it is possible that we end up with same names but different types, this results in incorrect completions. The go template logic always preferes the actual field/method name before the one from the embedded one. Thefore the completion logic should do the same. First get all method/fields names from the struct and then only add the field names from the embedded struct when they are not already present in the list. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | shell completion --format: only show usable methodsPaul Holzinger2022-05-18
| | | | | | | | | | | | | | | | | | | | | | | | In a template you cann call function that are defined on a type, however this is only useful if they return one value. If it returns more than one the template cannot know what value it has to display. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | shell completion --format: only show exported fieldsPaul Holzinger2022-05-18
| | | | | | | | | | | | | | | | | | | | | go templates only support exported fields, so the completion logic must filter the private fields out. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Merge pull request #14321 from mheon/no_error_on_danglingOpenShift Merge Robot2022-05-23
|\ \ \ | | | | | | | | Instead of erroring, clean up after dangling IDs in DB
| * | | Instead of erroring, clean up after dangling IDs in DBMatthew Heon2022-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For various (mostly legacy) reasons, Podman presently maintains a unified namespace for pods and containers - IE, we cannot have both a pod and a container named "test" at the same time. To implement this, we use a global database table of every pod and container ID (and another of every pod and container name). These entries should be added when containers/pods are added, and removed when containers/pods are removed, with the database's transactional integrity providing a guarantee that this is batched with the overall removal and that the DB should remain sane and consistent no matter what. As such, we treat a dangling ID as a hard error that stops the use of Podman. Unfortunately, we have someone run into this last Friday. I'm still not certain how exactly their DB got into this state, but without further clarification there, we can consider removing the error and making Podman instead clean up and remove any dangling IDs, which should restore Podman to a serviceable state. Drop an error message if we do this, though, because people should know that the DB is in a bad state. [NO NEW TESTS NEEDED] it is deliberately impossible to produce a configuration that would test this without hex-editing the DB file. Signed-off-by: Matthew Heon <mheon@redhat.com>
* | | | Merge pull request #14323 from tupyy/mainOpenShift Merge Robot2022-05-23
|\ \ \ \ | | | | | | | | | | Update _play kube_ doc following PR #14266 merging
| * | | | fix typoCosmin Tupangiu2022-05-23
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Cosmin Tupangiu <cosmin@redhat.com>
| * | | | Update _play kube_ doc following PR #14266 mergedCosmin Tupangiu2022-05-23
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Cosmin Tupangiu <cosmin@redhat.com>
* | | | | Merge pull request #14240 from cevich/fix_multiarch_buildOpenShift Merge Robot2022-05-23
|\ \ \ \ \ | |/ / / / |/| | | | [CI:BUILD] Cirrus: Fix building multiarch images
| * | | | Cirrus: Fix building multiarch imagesChris Evich2022-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The caching update made in https://github.com/containers/podman/pull/14016 neglected to attend to the "git repo." needs of this task. Fix this so images can build. Also, make this optional task only appear when the `[CI:BUILD]` magic string is used. No reason to tempt every PR author to press a mysterious button labeled 'trigger'. Signed-off-by: Chris Evich <cevich@redhat.com>
* | | | | 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
| * | | | | fix tests by randomize the device folder nameCosmin Tupangiu2022-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e2e tests tends to fail when running with multiple nodes because the same device folder name is used accross all nodes Signed-off-by: Cosmin Tupangiu <cosmin@redhat.com>
| * | | | | 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>
* | | | | | Merge pull request #14310 from Yuhta28/hotfix/documentOpenShift Merge Robot2022-05-23
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | [CI:DOCS] fix podman-for-windows.md
| * | | | | fix podman-for-windows.mdYuta2022-05-21
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Yuta <yuta_mori@outlook.jp>
* | | | | | Merge pull request #14300 from mtrmac/test-gpgme-buildOpenShift Merge Robot2022-05-23
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Update c/image
| * | | | | Update c/imageMiloslav Trmač2022-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... to bring in github.com/proglottis/gpgme 0.1.2 , and test its new use of pkg-config to find gpgme. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
* | | | | | Merge pull request #14274 from edsantiago/dependabot_release_notes_noneOpenShift Merge Robot2022-05-20
|\ \ \ \ \ \ | | | | | | | | | | | | | | dependabot: add release-note-none label
| * | | | | | dependabot: add release-note-none labelEd Santiago2022-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to https://github.com/openshift/release/pull/28686 in which we ask openshift-ci-bot to enforce a release-note label on new PRs. Dependabot PRs do not need release notes. Add a config setting (copied from cri-o) that tells dependabot to set release-note-none on new PRs. Signed-off-by: Ed Santiago <santiago@redhat.com>
* | | | | | | Merge pull request #14297 from jwhonce/wip/swaggerOpenShift Merge Robot2022-05-20
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Swagger refactor/cleanup
| * | | | | | | 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 #14272 from Luap99/completion2OpenShift Merge Robot2022-05-19
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | shell completion: use more constants in the code
| * | | | | | shell completion: use more constants instead of duplicating stringsPaul Holzinger2022-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is better to just reuse the existing constants instead of duplicating the strings. [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | | | | | shell completion: podman save --format use all valid valuesPaul Holzinger2022-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | docker-archive was missing from the completions. To prevent duplication use the same format list as podman save. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | | | | | shell completion: update podman inspect --type optionsPaul Holzinger2022-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add all option that are supported by the podman inspect --type flag to the completions. Also use the same constants instead of duplicating the strings. In order to do this I had to move the definitions into the common package to prevent an import cycle. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | | | | | shell completion: fix podman event --filter valuesPaul Holzinger2022-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The completion suggested incorrect values for `podman events --filter type=` . It should only list types not the event status. Also make sure to use the constants instead of duplicating the strings. Signed-off-by: Paul Holzinger <pholzing@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
| * | | | | | ci: pr-should-include-tests: add more exceptionsKir Kolyshkin2022-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add .golangci.yml, podman.spec.rpkg, and non top-level Makefiles. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
| * | | | | | Remove GO111MODULES useKir Kolyshkin2022-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using it is no longer needed. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
| * | | | | | Makefile: rm gofmt targetKir Kolyshkin2022-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is superceded by golangci-lint, which has gofmt as one of the linters. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
| * | | | | | Makefile: rm CHANGELOG_* and ISODATE varsKir Kolyshkin2022-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those are not used since commit 0d1ba0a58fdb15af7e. Fixes: 0d1ba0a58fdb15af7 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
| * | | | | | Makefile: rm -mod=vendorKir Kolyshkin2022-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "go build" no longer requires explicit "-mod=vendor", as this is the default since go 1.14. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
| * | | | | | Move GOPROXY from Makefile to cirrus.ymlKir Kolyshkin2022-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GOPROXY's default value is "https://proxy.golang.org,direct" since go 1.13, so it is redundant to set it explicitly. For some reason though, GOPROXY in Cirrus CI is set to direct, which makes things such as go mod tidy very slow. So, set the proper (default) value for in in .cirrus.yml. Do the same for GOSUMDB. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
| * | | | | | Makefile, podman.spec.rpkg: rm GOBIN and GOPATHKir Kolyshkin2022-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove GOPATH setting as since Go 1.9 it defaults to $HOME/go (for earlier versions it had to be specified explicitly). Remove GOPATH-related code from the spec, using relative paths when compiling packages, and enable Go modules, simplifying the spec. Remove support for multiple paths in GOPATH (which is rarely used and doesn't really work with modules). Remove setting GOBIN, rely on $GOPATH/bin instead. In case GOBIN is explicitly set (which is highly unlikely), forcefully ignore by unsetting it. Remove GOBIN from tools invocation since we added GOPATH/bin to PATH. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>