summaryrefslogtreecommitdiff
path: root/pkg
Commit message (Collapse)AuthorAge
* 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>
* | Merge pull request #4837 from mheon/rework_attachOpenShift Merge Robot2020-01-16
|\ \ | |/ |/| Add an API for Attach over HTTP API
| * Add an API for Attach over HTTP APIMatthew Heon2020-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new APIv2 branch provides an HTTP-based remote API to Podman. The requirements of this are, unfortunately, incompatible with the existing Attach API. For non-terminal attach, we need append a header to what was copied from the container, to multiplex STDOUT and STDERR; to do this with the old API, we'd need to copy into an intermediate buffer first, to handle the headers. To avoid this, provide a new API to handle all aspects of terminal and non-terminal attach, including closing the hijacked HTTP connection. This might be a bit too specific, but for now, it seems to be the simplest approach. At the same time, add a Resize endpoint. This needs to be a separate endpoint, so our existing channel approach does not work here. I wanted to rework the rest of attach at the same time (some parts of it, particularly how we start the Attach session and how we do resizing, are (in my opinion) handled much better here. That may still be on the table, but I wanted to avoid breaking existing APIs in this already massive change. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* | systemdgen: add --ignore flag to generic servicesValentin Rothberg2020-01-16
|/ | | | | | | | | | | | | | | | | The --ignore flag lets Podman ignore errors when a specified container does not exist (anymore). That's a nice addition to generic services generated via the --new flag. Those services create new containers and can hence allows user to manually remove a container; may it only be by accident. The important part of using the --ignore flag is that Podman will exit 0 which plays nicer with most restart policies; a non-zero exit may yield systemd to restart the entire service which is arguably wrong if the user manually deletes the container. If desired, users can still alter the generated files. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* make binaries: include serviceValentin Rothberg2020-01-16
| | | | | | | Include the service into make binaries such that we're it's being build in the CI. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* service: don't block sigtermValentin Rothberg2020-01-16
| | | | Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Merge pull request #4860 from vrothberg/v2-topOpenShift Merge Robot2020-01-15
|\ | | | | v2 api: top improvements
| * api: stats: fix typoValentin Rothberg2020-01-15
| | | | | | | | Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * api: utils: add an `IsLibpodRequest` handlerValentin Rothberg2020-01-15
| | | | | | | | | | | | | | | | | | Add a hanlder to figure out if the specified http request came through a libpod endpoint. A first user is the top endpoint which has a different default value for `ps_args` depending if the request came through the docker or libpod endpoint. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * refactor top codeValentin Rothberg2020-01-15
| | | | | | | | | | | | | | | | Move the top logic from pkg/adapter into the (*libpod.Container).Top(). This way, we drop the dependency from pkg/api on pkg/adapters and have a clearer separation of concerns. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * top: use a separate pipe for the error streamValentin Rothberg2020-01-15
| | | | | | | | | | | | | | Let's not mix apples and oranges and give stderr a dedicated pipe. This way, we don't return conmon log messages if run in debug mode. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * v2 api: top improvementsValentin Rothberg2020-01-15
| | | | | | | | | | | | | | | | * Use `pkg/adapter` to increase code reuse and reduce code redundancy. * Extend swagger docs to mention AIX descriptors. * Document the libpod endpoint which shares the same handler. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | [CI:DOCS]swagger cleanup and left-hand navbaude2020-01-15
| | | | | | | | | | | | | | | | add a static tags file so we can dictate the left-hand navigation. in doing so we now override the tag in the swagger:operation. we now have images and images (compat) as a way to differentiate. Signed-off-by: baude <bbaude@redhat.com>
* | Merge pull request #4868 from jwhonce/wip/sshdOpenShift Merge Robot2020-01-15
|\ \ | |/ |/| [CI:DOCS] Add APIv2 CLI example POC
| * Add APIv2 CLI example POCJhon Honce2020-01-15
| | | | | | | | | | | | | | * Add ReadMe, CLI and unit files to support socket activation, both for system and rootless Signed-off-by: Jhon Honce <jhonce@redhat.com>
* | v2: stats: drop redundant sleep when streamingValentin Rothberg2020-01-15
| | | | | | | | | | | | Also remove the redundant stats handler in libpod. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | v2: stats: libpod: use generic handlerValentin Rothberg2020-01-15
| | | | | | | | | | | | | | The docker and libpod endpoints provide the same functionality, so we can use the same handler. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | v2: stats: rigorous error checksValentin Rothberg2020-01-15
| | | | | | | | | | | | Also expect the container to be running. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | v2: stats: fix errorsValentin Rothberg2020-01-15
| | | | | | | | | | | | Also add some comments. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | v2: stats: do not ignore errorsValentin Rothberg2020-01-15
| | | | | | | | | | | | | | We must check all errors and handle them properly. Otherwise, we can run into nil dereferences ultimately killing the service. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | v2: stats: remove windows-specific fieldsValentin Rothberg2020-01-15
| | | | | | | | | | | | | | `NumProcs` and `StorageStats` are windows specific and are not popoulated on Linux. Hence, we can safely remove them. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | Merge pull request #4806 from vrothberg/seccompOpenShift Merge Robot2020-01-15
|\ \ | |/ |/| policy for seccomp-profile selection