Remove libpod dependency from podmanreceiver #5430
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
podmanreceiver uses the official Go podman bindings but the bindings
pull in all of the podman codebase and its dependencies. We are
essentially embedding podman into the collector. This causes a number of
problems both at compile and run time.
This commit ditches the podman library and uses net/http to consume the
podman v3 REST API instead.
This commit also adds a new config option to let users use a specific
podman API endpoint.
Fixes #5244
Fixes #5414
Fixes #5241
Fixes #5245
Testing:
Tested manually with podman machine on macOS.
Documentation:
Documented the new
api_version
,ssh_key
andssh_passphrase
config option. No other changes are required on behalf of users. We swapped the underlying client without changing any behavior.SSH connections were supported before but it was only possible to configure them via environment variables which was not documented. Now we support it via config and document it.
ssh_key
andssh_passphrase