Commit Graph

15 Commits

Author SHA1 Message Date
openshift-merge-bot[bot] ce424557dd Merge pull request #1781 from alexandear/fix-typos-across-repo
Fix typos across repo; extend codespell config
2024-01-04 11:12:20 +00:00
Oleksandr Redko 3cc2a76ae9 Fix typos across repo; extend codespell config
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2024-01-03 23:38:47 +02:00
Oleksandr Redko ba4c7c98bb chore: remove outdated build constraints
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2024-01-03 22:56:00 +02:00
Paul Holzinger 70d14082ea pkg/netns: UnmountNS() accept netns path as string
I want to switch podman over to only using strings for the netns path.
So we no longer pass this interface around. Buildah doesn't use this so
we only need to fix it in Podman. I have a WIP PR[1] for that.

[1] https://github.com/containers/podman/pull/16756

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-12-07 14:53:47 +01:00
Ygal Blum f7978269e7 Libnetwork: Add NetworkCreateOptions to the NetworkCreate method
For now, only add IgnoreIfExists flag.
Having this flag is very useful when using scripts or systemd unit files

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2022-12-05 15:57:15 +02:00
Valentin Rothberg e17483b871 bump to golangci-lint v1.50.0
Used `go fmt` rules to migrate away from deprecated functions, for
instance `gofmt -w -s -r 'ioutil.TempDir(a, b) -> os.MkdirTemp(a, b)'`

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-17 15:03:07 +02:00
Kir Kolyshkin 4393468343 *_test.go: fix or suppress errcheck warnings
Where we can check the error, do it. Where we can not, ignore it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-04-09 15:18:22 -07:00
Paul Holzinger 82616479ae libnetwork: ipam driver none disable dns
When we create a network with the ipam driver none we should disabled
dns automatically. Since we mange no ips we cannot provide name
resolution anyway.

This fixes a problem I spotted when adding test to the podman CI.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-31 16:39:23 +02:00
Sascha Grunert a6b63a5c47 Switch to ginkgo/v2
Update ginkgo to the next major version which has been released a while
ago.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-03-30 10:03:17 +02:00
Paul Holzinger 76fca332db libnetwork/cni: fix CNIResultToStatus conversion logic
When we read the cni result we should loop over the interfaces and then
the ips. If we only loop over ips we will miss interfaces that have no
ips assigned. We also only care about interfaces created in the netns.

This is required for ipam driver none case, see the test case.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-29 18:46:29 +02:00
OpenShift Merge Robot 490b31cd90 Merge pull request #968 from vrothberg/go1.18
go fmt: use go 1.18 conditional-build syntax
2022-03-18 12:00:40 +01:00
Valentin Rothberg 095aded91c go fmt: use go 1.18 conditional-build syntax
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-18 11:04:40 +01:00
Paul Holzinger 6838f583e7 libnetwork/cni: add support for arbitrary ipam plugins
When we parse CNI config files to convert them into a native Network
struct we should not error unless there is something broken.
The goal is to allow all cni configs to still function but podman
inspect will not be able to show all informations such as subnets about
this network.

Because this is a valid use case we only log this at info level.

Fixes containers/podman#12990
Fixes containers/podman#13124

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-17 16:59:28 +01:00
Paul Holzinger 4fcb18dca7 libnetwork: fix lint errors
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-17 14:24:21 +01:00
Paul Holzinger 002673d22f add libnetwork package
Copy the libpod/network packages from podman to here so we can use the
same code in buildah as well.

This is mostly a one to one copy only the import paths have been changed
and some errors were added.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-16 19:07:38 +01:00