Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility: Add filters for listing networks #7462

Closed
minioin opened this issue Aug 26, 2020 · 7 comments
Closed

Compatibility: Add filters for listing networks #7462

minioin opened this issue Aug 26, 2020 · 7 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@minioin
Copy link

minioin commented Aug 26, 2020

I tried to run k3d with podman system service but k3d returned error with filters for listing networks is not implemented . As I looked at docker api, it lists filters as an option.

This features is one of the first thing I encountered while running k3d under podman .

@Luap99
Copy link
Member

Luap99 commented Aug 26, 2020

The problem is that podman handles networking differently from docker. The podman backend only supports name and plugin as valid filter keys for networks. I guess that's the reason why the api don't allow filters.

@minioin
Copy link
Author

minioin commented Aug 27, 2020

Considering that we already need a system service for docker compatibility, how is it difficult to maintain a list of networks to implement this feature? What is blocking this api exactly?

@Luap99
Copy link
Member

Luap99 commented Aug 27, 2020

@mheon stated that he is looking to improve this in the future #7080 (comment)

@minioin Do you know what filter k3d is using? I think we can at least implement the name filter for now.

@Luap99 Luap99 added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 27, 2020
@rhatdan
Copy link
Member

rhatdan commented Aug 27, 2020

@minioin Time is the only thing blocking us. Getting community to help build it is always helpful.

@iwilltry42
Copy link

@Luap99 , in k3d we're only filtering by name: https://github.com/rancher/k3d/blob/main/pkg/runtimes/docker/network.go#L47-L54

        // (1) configure list filters
	args := filters.NewArgs()
	args.Add("name", name)

	// (2) get filtered list of networks
	networkList, err := docker.NetworkList(ctx, types.NetworkListOptions{
		Filters: args,
	})

@rhatdan
Copy link
Member

rhatdan commented Sep 10, 2020

@iwilltry42 @minioin @Luap99 Can we close this issue now since your PR has been merged?

@mheon mheon closed this as completed Sep 11, 2020
@mheon
Copy link
Member

mheon commented Sep 11, 2020

I'm going to go ahead and close this. We're not 100% there yet, but we can open separate, more specific issues for any remaining missing filters.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

5 participants