aboutsummaryrefslogtreecommitdiff
path: root/pkg/bindings
Commit message (Collapse)AuthorAge
* remote: fix implementation of build with --userns=auto for APIAditya R2022-08-26
| | | | | | | | | | | `podman-remote` and Libpod API does not supports build with `--userns=auto` since `IDMappingOptions` were not implemented for API and bindings, following PR implements passing `IDMappingOptions` via bindings to API. Closes: https://github.com/containers/podman/issues/15476 Signed-off-by: Aditya R <arajan@redhat.com>
* Add ProgressWriter to PullOptionsVladimir Kochnev2022-08-19
| | | | Signed-off-by: Vladimir Kochnev <hashtable@yandex.ru>
* podman manifest create: accept --amend and --insecure flagsNalin Dahyabhai2022-08-16
| | | | | | | | Accept a --amend flag in `podman manifest create`, and treat `--insecure` as we would `--tls-verify=false` in `podman manifest`'s "add", "create", and "push" subcommands. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
* Merge pull request #15270 from nicrowe00/kubegenerateOpenShift Merge Robot2022-08-16
|\ | | | | Add "podman kube generate" command
| * Add "podman kube generate" commandNiall Crowe2022-08-11
| | | | | | | | | | | | | | | | "podman kube generate" creates Kubernetes YAML from Podman containers, pods or volumes. Users will still be able to use "podman generate kube" as an alias of "kube generate". Signed-off-by: Niall Crowe <nicrowe@redhat.com>
* | remote manifest push: show copy progressNaoto Kobayashi2022-08-11
|/ | | | | | | | | | `podman-remote manifest push` has shown absolutely no progress at all. Fix that by doing the same as the remote-push code does. Like remote-push, `quiet` parameter is true by default for backwards compatibility. Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
* Merge pull request #15094 from cdoern/sshOpenShift Merge Robot2022-08-10
|\ | | | | podman ssh work, using new c/common interface
| * podman ssh work, using new c/common interfaceCharlie Doern2022-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implement new ssh interface into podman this completely redesigns the entire functionality of podman image scp, podman system connection add, and podman --remote. All references to golang.org/x/crypto/ssh have been moved to common as have native ssh/scp execs and the new usage of the sftp package. this PR adds a global flag, --ssh to podman which has two valid inputs `golang` and `native` where golang is the default. Users should not notice any difference in their everyday workflows if they continue using the golang option. UNLESS they have been using an improperly verified ssh key, this will now fail. This is because podman was incorrectly using the ssh callback method to IGNORE the ssh known hosts file which is very insecure and golang tells you not yo use this in production. The native paths allows for immense flexibility, with a new containers.conf field `SSH_CONFIG` that specifies a specific ssh config file to be used in all operations. Else the users ~/.ssh/config file will be used. podman --remote currently only uses the golang path, given its deep interconnection with dialing multiple clients and urls. My goal after this PR is to go back and abstract the idea of podman --remote from golang's dialed clients, as it should not be so intrinsically connected. Overall, this is a v1 of a long process of offering native ssh, and one that covers some good ground with podman system connection add and podman image scp. Signed-off-by: Charlie Doern <cdoern@redhat.com>
* | Merge pull request #15230 from YoitoFes/Issue-15211OpenShift Merge Robot2022-08-09
|\ \ | |/ |/| pkg/bindings: Support writing image push progress to specified io.Writer
| * pkg/bindings: Support writing image push progress to specified io.WriterNaoto Kobayashi2022-08-08
| | | | | | | | | | | | | | | | | | Currently bindings writes image push progress to os.Stderr. Since os.Stderr is inconvenience for bindings caller to process the progress messages, Added this support. Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
* | build: implement --cache-to,--cache-from and --cache-ttlAditya R2022-08-09
|/ | | | | | | [NO NEW TESTS NEEDED] [NO TESTS NEEDED] Signed-off-by: Aditya R <arajan@redhat.com>
* remove image podman no pruneKarthik Elango2022-08-04
| | | | Signed-off-by: Karthik Elango <kelango@redhat.com>
* switch from "kube/play" endpoint to "play/kube" endpoint.Niall Crowe2022-08-02
| | | | | | | | | When podman kube play was added the endpoint for the kube play/play kube commands was switched from the "play kube" endpoint to the new "kube play" endpoint. This caused issues with the remote client, requiring the need to use the "play kube" endpoint again in order to avoid these issues. Signed-off-by: Niall Crowe <nicrowe@redhat.com>
* Add flag "--compression-format" to "podman manifest push" both in ↵Romain Geissler2022-07-30
| | | | | | | | | local/remote mode. Also Fix usage of flag "--compression-format" for remote "podman image push". Fix usage of flags "--format", "--remove-signatures" in remote "podman manifest push". Closes #15109. Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
* Semiperiodoc cleanup of obsolete FIXMEsEd Santiago2022-07-25
| | | | | | | | | | | | | | | | Some refer to issues that are closed. Remove them. Some are runc bugs that will never be fixed. Say so, and remove the FIXME. One (bps/iops) should probably be fixed. File an issue for it, and update comment to include the issue# so my find-obsolete-skips script can track it. And one (rootless mount with a "kernel bug?" comment) is still not fixed. Leave the skip, but add a comment documenting the symptom. Signed-off-by: Ed Santiago <santiago@redhat.com>
* remote push: show copy progressValentin Rothberg2022-07-21
| | | | | | | | | | | | | | | `podman-remote push` has shown absolutely no progress at all. Fix that by doing essentially the same as the remote-pull code does. The get-free-out-of-jail-card for backwards compatibility is to let the `quiet` parameter default to true. Since the --quioet flag wasn't working before either, older Podman clients do not set it. Also add regression tests to make sure we won't regress again. Fixes: #11554 Fixes: #14971 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* Switch to `github.com/blang/semver/v4`Sascha Grunert2022-07-14
| | | | | | | | Switch to the latest version of the now go module compatible release. [NO NEW TESTS NEEDED] Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
* Add "podman kube play" cmdNiall Crowe2022-07-13
| | | | | | | | | | | The "podman kube play" command is designed to be a replacement for the "podman play kube" command. It performs the same function as "play kube" while also still working with the same flags and options. The "podman play kube" command is still functional as an alias of "kube play". Closes #12475 Signed-off-by: Niall Crowe <nicrowe@redhat.com> Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* pkg: switch to golang native error wrappingSascha Grunert2022-07-08
| | | | | | | | | We now use the golang error wrapping format specifier `%w` instead of the deprecated github.com/pkg/errors package. [NO NEW TESTS NEEDED] Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
* use c/common code for resize and CopyDetachablePaul Holzinger2022-07-06
| | | | | | | | | Since conmon-rs also uses this code we moved it to c/common. Now podman should has this also to prevent duplication. [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* libpod/runtime: switch to golang native error wrappingSascha Grunert2022-07-04
| | | | | | | | | We now use the golang error wrapping format specifier `%w` instead of the deprecated github.com/pkg/errors package. [NO NEW TESTS NEEDED] Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
* api,images: add support for LookupManifest to Image remove APIAditya R2022-06-30
| | | | | | | | | | | | | ImagesBatchRemoval and ImageRemoval now honors and accepts `LookupManifest` parameter which further tells libimage to resolve to manifest list if it exists instead of actual image. Following PR also makes `podman-remote manifest rm` functional which was broken till now. Closes: https://github.com/containers/podman/issues/14763 Signed-off-by: Aditya R <arajan@redhat.com>
* Merge pull request #14740 from flouthoc/bindings-remove-manifestopenshift-ci[bot]2022-06-29
|\ | | | | bindings: Add support for `Delete` for deleting manifest list from local storage.
| * bindings: Add support for Delete in pkg/bingings/manifestAditya R2022-06-29
| | | | | | | | | | | | | | | | | | | | | | Bindings already support `Remove` which removes a manifest from the list following function adds support for removing entire manifest for local storage. Similar functionality can be also used indirectly by using `Remove` defined in image bindings Signed-off-by: Aditya R <arajan@redhat.com>
* | podman image scp remote support & podman image scp taggingcdoern2022-06-28
|/ | | | | | | | | | | | | | | | | | | add support for podman-remote image scp as well as direct access via the API. This entailed a full rework of the layering of image scp functions as well as the usual API plugging and type creation also, implemented podman image scp tagging. which makes the syntax much more readable and allows users t tag the new image they are loading to the local/remote machine: allow users to pass a "new name" for the image they are transferring `podman tag` as implemented creates a new image im `image list` when tagging, so this does the same meaning that when transferring images with tags, podman on the remote machine/user will load two images ex: `podman image scp computer1::alpine computer2::foobar` creates alpine:latest and localhost/foobar on the remote host implementing tags means removal of the flexible syntax. In the currently released podman image scp, the user can either specify `podman image scp source::img dest::` or `podman image scp dest:: source::img`. However, with tags this task becomes really hard to check which is the image (src) and which is the new tag (dst). Removal of that streamlines the arg parsing process Signed-off-by: Charlie Doern <cdoern@redhat.com>
* Fix spelling "setup" -> "set up" and similarErik Sjölund2022-06-22
| | | | | | | | | | * Replace "setup", "lookup", "cleanup", "backup" with "set up", "look up", "clean up", "back up" when used as verbs. Replace also variations of those. * Improve language in a few places. Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
* Remove lorgus.Infof on bindings start and attachDaniel J Walsh2022-06-21
| | | | | | | | | | | | We are only doing logrus.Info on a couple of bindings. I see no reason to only do this on a couple, seems like debugging information more then useful to the caller. We had a complaint about this so removing. Fixes: https://github.com/containers/podman/issues/13504 [NO NEW TESTS NEEDED] Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #13384 from flouthoc/podman-remote-add-with-annotateopenshift-ci[bot]2022-06-21
|\ | | | | bindings: manifest should follow `es_model` naming convention while marshalling `OSVersion` and `OSFeatures`
| * bindings: add manifest should follow es_model while marshalling OSVersion ↵Aditya R2022-06-02
| | | | | | | | | | | | | | | | | | | | | | | | and OSFeatures It seems API needs json names for OSVersion and OSFeatures in es_model ref: https://github.com/containers/podman/blob/main/pkg/domain/entities/manifest.go#L42 So at bindings end ensure that we honor es_model naming convention when we perform marshalling otherwise API will ignore these fields Signed-off-by: Aditya R <arajan@redhat.com>
* | Merge pull request #14585 from Luap99/nolintopenshift-ci[bot]2022-06-14
|\ \ | | | | | | golangci-lint: enable nolintlint
| * | golangci-lint: enable nolintlintPaul Holzinger2022-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nolintlint linter does not deny the use of `//nolint` Instead it allows us to enforce a common nolint style: - force that a linter name must be specified - do not add a space between `//` and `nolint` - make sure nolint is only used when there is actually a problem Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Update vendor of containers/buildahDaniel J Walsh2022-06-13
|/ / | | | | | | | | | | | | | | Changes since 2022-05-31: - add --omit-history option (buildah PR 4028) Signed-off-by: Ed Santiago <santiago@redhat.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #14560 from rhatdan/remoteOpenShift Merge Robot2022-06-13
|\ \ | | | | | | podman-remote push --remove-signatures support
| * | podman-remote push --remove-signatures supportDaniel J Walsh2022-06-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | I don't see a reason why we don't support --remove-signatures from remote push, so adding support. Fixes: https://github.com/containers/podman/issues/14558 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | podman cp: do not overwrite non-dirs with dirs and vice versaValentin Rothberg2022-06-10
|/ / | | | | | | | | | | | | | | | | | | Add a new `--overwrite` flag to `podman cp` to allow for overwriting in case existing users depend on the behavior; they will have a workaround. By default, the flag is turned off to be compatible with Docker and to have a more sane behavior. Fixes: #14420 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* / podman-remote: enable support for additional build-context on macOS, remoteAditya R2022-06-02
|/ | | | | | | | Feature of additional build context added here https://github.com/containers/buildah/pull/3978 already exists on `podman` following PR just enables this feature of `podman-remote` and `podman on macOS` setups. Signed-off-by: Aditya R <arajan@redhat.com>
* vendor: bump buildah to v1.26.1-0.20220524184833-5500333c2e06Aditya R2022-05-26
| | | | | | Bump buildah to v1.26.1-0.20220524184833-5500333c2e06 Signed-off-by: Aditya R <arajan@redhat.com>
* pkg/bindings/play/play.go: drop TODO messageValentin Rothberg2022-05-25
| | | | | | | As already done in a previous commit: a global system context does not make sense for bindings, so remove the message. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* pkg/bindings/containers/archive.go: drop TODOValentin Rothberg2022-05-25
| | | | | | We are already passed 4.0 and a wrapper like this really does not hurt. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* 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>
* 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>
* 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>
* 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>
* 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>
* | 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>
* 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>
* 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>
* enable gocritic linterPaul Holzinger2022-04-26
| | | | | | | | | | | | | | | | | | | | | | The linter ensures a common code style. - use switch/case instead of else if - use if instead of switch/case for single case statement - add space between comment and text - detect the use of defer with os.Exit() - use short form var += "..." instead of var = var + "..." - detect problems with append() ``` newSlice := append(orgSlice, val) ``` This could lead to nasty bugs because the orgSlice will be changed in place if it has enough capacity too hold the new elements. Thus we newSlice might not be a copy. Of course most of the changes are just cosmetic and do not cause any logic errors but I think it is a good idea to enforce a common style. This should help maintainability. Signed-off-by: Paul Holzinger <pholzing@redhat.com>