summaryrefslogtreecommitdiff
path: root/pkg
Commit message (Collapse)AuthorAge
* Merge pull request #5082 from baude/specOpenShift Merge Robot2020-02-04
|\ | | | | [CI:DOCS] Spec proposal
| * [CI:DOCS]addition of specgen packageBrent Baude2020-02-04
| | | | | | | | | | | | | | | | | | | | warning: the naming of this might change as well as the location. this is a build on a PR from mheon from last year that proposes a shift from our current approach of creating containers based on the arbitrarily made createconfig. the new approach would be to have a specification that is detached from the podman cli. the spec could then be generated and used to make a container. this theoretically is the beginning of a long-needed refactor involving how we get from the cli -> libpod | apiv2 -> libpod with code re-use and less duplication. the intent is to build the apiv2 container creation based on this approach only. wiring to the podman cli will happen after the fact. Signed-off-by: Brent Baude <bbaude@redhat.com>
| * Initial implementation of a spec generator packageMatthew Heon2020-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current Libpod pkg/spec has become a victim of the better part of three years of development that tied it extremely closely to the current Podman CLI. Defaults are spread across multiple places, there is no easy way to produce a CreateConfig that will actually produce a valid container, and the logic for generating configs has sprawled across at least three packages. This is an initial pass at a package that generates OCI specs that will supersede large parts of the current pkg/spec. The CreateConfig will still exist, but will effectively turn into a parsed CLI. This will be compiled down into the new SpecGenerator struct, which will generate the OCI spec and Libpod create options. The preferred integration point for plugging into Podman's Go API to create containers will be the new CreateConfig, as it's less tied to Podman's command line. CRI-O, for example, will likely tie in here. Signed-off-by: Matthew Heon <mheon@redhat.com>
* | Merge pull request #5033 from sujil02/new-testOpenShift Merge Robot2020-02-04
|\ \ | | | | | | Adding test to check Tag and list images endpoints in apis.
| * | Add a binding test to check image tag and list commands.Sujil022020-02-03
| | | | | | | | | | | | | | | | | | | | | | | | Include testcase to validate tag api responses and check if all the image instaces are shown list command. Also, Update the binding process and the response Signed-off-by: Sujil02 <sushah@redhat.com>
* | | swagger: v2: libpod/images/{import,load,pull}Valentin Rothberg2020-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: this commit is merely adding swagger documentation and the golang stubs and types for the proposed endpoints. The implementation will follow in separate individual changes in the future. The ultimate goal is to prevent the libpod API from exposing the rather complex /images/create endpoint from Docker and split it into easier to implement, use and comprehend endpoints with a more narrow focus. # Import Add the v2 swagger documentation for the libpod/images/import endpoint. Note that we have intend to have separate backend and not mix it up with load since import allows for specifying a URL instead of a local tarball. # Load Complete the v2 swagger documentation for the libpod/images/load endpoint. Note that we are accounting for future plans to be able to load multiple images from one oci/docker archive by returning an array of image-load responses. Also move the (incomplete) implementation of the generic endpoint to the corresponding package and create a stub for the libpod handler, which will be implemented once there's an agreement on the proposed API. # Pull Add the v2 swagger documentation for the libpod/images/pull endpoint. Similar to the load endpoint, we return an array since more than one image can be pulled when the `all-tags` parameter is set. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #5061 from baude/apiv2swaggerexecOpenShift Merge Robot2020-02-04
|\ \ \ | |_|/ |/| | [CI:DOCS]add apiv2 endpoints for exec
| * | [CI:DOCS]add apiv2 endpoints for execBrent Baude2020-02-03
| |/ | | | | | | | | | | | | | | add the openapi/swagger documentation for exec. The subcommands added are create, inspect, resize, and start. at the time of this writing, no structure is declared for the inspect response. once the libpod work for this is complete, we can inherit and swaggerize it. Signed-off-by: Brent Baude <bbaude@redhat.com>
* / Update /_ping supportJhon Honce2020-02-03
|/ | | | | | | | | | | | | | | | | | | | | * Add swagger support and documentation * Promote handler as there can only ever be one * Update swagger tags Between verbs and paths there are four endpoints for /_ping. I've attempted to document them well without four copies of the details. Time will tell. Clients will use the headers `Libpod-API-Version` and `Libpod-Buildha-Version` to determine if they are connecting to a Podman service or some other compatible engine. Client calls GET(/_ping): * VARLINK engines will fail with error message * Compatible engines will return 200 without Libpod headers * Podman engines will return 200 and Libpod headers Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Merge pull request #5036 from vrothberg/fix-5034OpenShift Merge Robot2020-01-31
|\ | | | | sigproxy: return after closing the channel
| * sigproxy: return after closing the channelValentin Rothberg2020-01-31
| | | | | | | | | | | | | | | | | | | | When stopping signal handling (e.g., to properly handle ^C) we are also closing the signal channel. We should really return from the go-routine instead of continuing and risking double-closing the channel which leads to a panic. Fixes: #5034 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | fix longname handling for bindingsBrent Baude2020-01-31
|/ | | | | | the api needs to account for image input where the image is encoded as a fqd image name. Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #5020 from baude/bindingtestrootlessOpenShift Merge Robot2020-01-30
|\ | | | | Bindingtestrootless
| * rootless: enable shortcut only for podmanGiuseppe Scrivano2020-01-29
| | | | | | | | | | | | | | disable joining automatically the user namespace if the process is not podman. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
| * test: honor TEMPDIR variableGiuseppe Scrivano2020-01-29
| | | | | | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Merge pull request #5022 from ssbarnea/fix/validateOpenShift Merge Robot2020-01-30
|\ \ | | | | | | Assure validate includes lint
| * | Assure validate includes lintSorin Sbarnea2020-01-30
| |/ | | | | | | | | | | Fixed issue where lint was not run on CI, so we missed to prevent regressions. Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
* / compat container names begin with /Brent Baude2020-01-30
|/ | | | | | when using the apiv2, containers names are preceeded with a /. fixing this for inspect and listcontainers. Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #5015 from baude/bindingtestfixesOpenShift Merge Robot2020-01-29
|\ | | | | apiv2 binding test fixes
| * apiv2 binding test fixesBrent Baude2020-01-29
| | | | | | | | | | | | a recent refactor in the bindings broke the tests. quick fixes to get them working again. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | display file name of bad cni confBrent Baude2020-01-28
|/ | | | | | | if one of the cni conf files is badly formatted or cannot be loaded, we now display the error as well as the filename. Fixes: #2909 Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #4993 from baude/playkubepullOpenShift Merge Robot2020-01-28
|\ | | | | honor pull policy in play kube
| * honor pull policy in play kubeBrent Baude2020-01-28
| | | | | | | | | | | | | | | | When a container specification has a pull policy, we should honor it when recreating the pods/containers from yaml. furthermore, ini kube, if a tag is :latest, then the always pull policy is automatically instituted. Fixes: #4880 Signed-off-by: Brent Baude <bbaude@redhat.com>
* | Merge pull request #4964 from openSUSE/apparmor-signalsOpenShift Merge Robot2020-01-28
|\ \ | | | | | | apparmor: allow receiving of signals from 'podman kill'
| * | apparmor: allow receiving of signals from 'podman kill'Sascha Grunert2020-01-24
| | | | | | | | | | | | | | | | | | | | | | | | In newer kernels, AppArmor will reject attempts to send signals to a container because the signal originated from outside of that AppArmor profile. Correct this by allowing all unconfined signals to be received. Signed-off-by: Sascha Grunert <sgrunert@suse.com>
* | | [CI:DOCS]Binding overhaulsBrent Baude2020-01-28
| |/ |/| | | | | | | | | | | | | | | | | Add binding for networks and begin documentation for binding methods for godoc. Also, add major functions to their own subpackages so reduce the amount of of method confusion. So instead of: bindings.ListImages(), we now do a [bindings].images.List(). Also, the connection is passed to each binding method via a context to allow for future growth. Lastly, add first set of tests. There are a couple of things to work out for rootless tests yet. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | inspect image healthchecksBrent Baude2020-01-27
| | | | | | | | | | | | | | when a docker image has a defined healthcheck, it should be displayed with inspect. this is only valid for docker images as oci images are not aware of healthchecks. Fixes: #4799 Signed-off-by: Brent Baude <bbaude@redhat.com>
* | Merge pull request #4965 from baude/reviewcorrections3OpenShift Merge Robot2020-01-25
|\ \ | | | | | | APIv2 review corrections #3
| * | APIv2 review corrections #3Brent Baude2020-01-25
| | | | | | | | | | | | | | | | | | The third pass of corrections for the APIv2. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | camelcase: fix lint reportsValentin Rothberg2020-01-25
| | | | | | | | | | | | Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | fork fatih/camelcaseValentin Rothberg2020-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | faith/camelcase has been archived and is no longer maintained. The package is sufficiently small and self-contained enough to maintain it in libpod. Fixes: #4783 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Refactor time parsing to be more liberal in accepted valuesJhon Honce2020-01-24
|/ / | | | | | | | | | | * Added helper function to allow parsing from filters Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Merge pull request #4958 from jwhonce/wip/filtersOpenShift Merge Robot2020-01-24
|\ \ | |/ |/| [CI:DOCS] Add query parameter converters for complex types
| * Add query parameter converters for complex typesJhon Honce2020-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add converter for URL query parameters of type map[string][]string * Add converter for URL query parameters of type time.Time * Added function to allocate and configure schema.Decoder for API use * Updated API handlers to leverage new converters, and correct handler code for filter type An encoding example for a client using filters: v := map[string][]string{ "dangling": {"true"}, } payload, err := jsoniter.MarshalToString(v) if err != nil { panic(err) } payload = "?filters=" + url.QueryEscape(payload) Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Review corrections pass #2Brent Baude2020-01-23
|/ | | | | | Add API review comments to correct documentation and endpoints. Also, add a libpode prune method to reduce code duplication. Only used right now for the API but when the remote client is wired, we will switch over there too. Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #4936 from jwhonce/wip/swagger2OpenShift Merge Robot2020-01-22
|\ | | | | [CI:DOCS] Enable swagger validation for each PR
| * Enable swagger validation for each PRJhon Honce2020-01-22
| | | | | | | | | | | | | | | | | | * Update swagger:operation's to pass validation * 'name' path parameter now used throughout API * Added #/response/ok for 200 returns, TBD values have been replaced with legal values. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | Merge pull request #4920 from openSUSE/cgroup2-super-magicOpenShift Merge Robot2020-01-22
|\ \ | |/ |/| Use cgroupv2 super magic from golang.org/x/sys/unix
| * Use cgroupv2 super magic from golang.org/x/sys/unixSascha Grunert2020-01-21
| | | | | | | | | | | | | | We can use this constant from the already existing sys/unix package instead of defining it by our own. Signed-off-by: Sascha Grunert <sgrunert@suse.com>
* | Merge pull request #4912 from jwhonce/wip/swaggerOpenShift Merge Robot2020-01-22
|\ \ | | | | | | [CI:DOCS] Update build images
| * | Update build imagesJhon Honce2020-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add swagger annotations for all the query and response parameters for buildimages * Improve populating the BuildOptions struct * Improve swagger.json generation, removing tags.xml and move tag definiation into the swagger:meta block * Update Makefile to be more robust, added target for validation * TODO once validation passes add that step to the generation step Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | | Merge pull request #4861 from giuseppe/add-cgroups-disabled-conmonOpenShift Merge Robot2020-01-22
|\ \ \ | | | | | | | | oci_conmon: do not create a cgroup under systemd
| * | | systemdgen: specify --cgroups=disabled-conmon for --newGiuseppe Scrivano2020-01-16
| | | | | | | | | | | | | | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
| * | | podman: add new option --cgroups=no-conmonGiuseppe Scrivano2020-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it allows to disable cgroups creation only for the conmon process. A new cgroup is created for the container payload. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | | Merge pull request #4911 from giuseppe/rootless-set-containers-envOpenShift Merge Robot2020-01-22
|\ \ \ \ | | | | | | | | | | rootless: set C variables also on shortcut
| * | | | rootless: set C variables also on shortcutGiuseppe Scrivano2020-01-20
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make sure the rootless env variables are set also when we are joining directly the user+mount namespace without creating a new process. It is required by pkg/unshare in containers/common. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | | Add service endpointbaude2020-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add service endpoint for the new API. Also supports the varlink implementation. Signed-off-by: baude <bbaude@redhat.com> Refactor to allow developer more control of API server * Add api.NewServerWithSettings() to create an API server with custom settings * Add api.ListenUnix() to create a UDS net.Listener and setup UDS Signed-off-by: Jhon Honce <jhonce@redhat.com> Signed-off-by: baude <bbaude@redhat.com> More service completion Add podman service command that allows users to run either a RESTful or varlink protocol API service. Addition of docs and RESTful listening. Signed-off-by: baude <bbaude@redhat.com> Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | | [CI:DOCS]First pass at review commentsbaude2020-01-21
| |_|/ |/| | | | | | | | | | | | | | | | | Tackling the first comments in the review pass. More to come. Signed-off-by: baude <bbaude@redhat.com> Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | [CI:DOCS] Add logo and dev statementBrent Baude2020-01-20
|/ / | | | | | | | | | | Add statement to the info section stating this is experimental only for now. Also add the podman logo to the right-hand navigation. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | post-process swagger yaml for publishbaude2020-01-17
| | | | | | | | | | Signed-off-by: baude <bbaude@redhat.com> Signed-off-by: Chris Evich <cevich@redhat.com>