podman/pkg/api/handlers/libpod
Matt Heon 174631f726 Convert SpecGen values to be nullable where possible
SpecGen is our primary container creation abstraction, and is
used to connect our CLI to the Libpod container creation backend.
Because container creation has a million options (I exaggerate
only slightly), the struct is composed of several other structs,
many of which are quite large.

The core problem is that SpecGen is also an API type - it's used
in remote Podman. There, we have a client and a server, and we
want to respect the server's containers.conf. But how do we tell
what parts of SpecGen were set by the client explicitly, and what
parts were not? If we're not using nullable values, an explicit
empty string and a value never being set are identical - and we
can't tell if it's safe to grab a default from the server's
containers.conf.

Fortunately, we only really need to do this for booleans. An
empty string is sufficient to tell us that a string was unset
(even if the user explicitly gave us an empty string for an
option, filling in a default from the config file is acceptable).
This makes things a lot simpler. My initial attempt at this
changed everything, including strings, and it was far larger and
more painful.

Also, begin the first steps of removing all uses of
containers.conf defaults from client-side. Two are gone entirely,
the rest are marked as remove-when-possible.

[NO NEW TESTS NEEDED] This is just a refactor.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-01-30 10:42:24 -05:00
..
containers.go Add missing return after errors 2023-02-06 20:32:06 +01:00
containers_create.go Convert SpecGen values to be nullable where possible 2024-01-30 10:42:24 -05:00
containers_stats.go Fix: use --all in podman stats to get all containers stats 2023-07-26 09:41:14 +03:00
generate.go Add `--podman-only` flag to `podman generate kube` 2023-07-14 09:35:59 -04:00
healthcheck.go Add support for startup healthchecks 2022-11-28 13:30:29 -05:00
images.go Accept a config blob alongside the "changes" slice when committing 2023-11-30 09:00:52 -05:00
images_pull.go api: add `compatMode` paramenter to libpod's pull endpoint 2023-10-11 10:58:05 +02:00
images_push.go Fix push endpoint stream 2023-12-13 13:01:21 -05:00
info.go bump go module to version 4 2022-01-18 12:47:07 +01:00
kube.go remote: fix podman-remote kube play --publish-all 2023-12-29 12:41:54 +09:00
manifests.go Replace strings.SplitN with strings.Cut 2024-01-11 13:50:15 +00:00
networks.go Add missing return after errors 2023-02-06 20:32:06 +01:00
play.go Add "podman kube play" cmd 2022-07-13 15:27:03 +01:00
pods.go Merge pull request #19066 from Luap99/ps 2023-07-14 13:17:59 +02:00
secrets.go Add --replace flag to podman secret create 2023-07-09 07:26:09 -04:00
swagger_spec.go pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
system.go Add podman system prune --external 2022-12-05 18:09:21 +01:00
volumes.go Add `since` as valid filter option for `volume` subcommands 2023-07-18 14:52:42 -04:00