Open soharaki opened 3 years ago
client.Containers()
's filters support some features.
https://godoc.org/k8s.io/cri-api/pkg/apis/runtime/v1alpha2#ContainerFilter
For example, we get some containers with the label lkey or lkey2 by executing the below.
filters := "labels.lkey==lvalue"
filters2 := "labels.lkey2==lvalue2"
containers, err := client.Containers(ctx, filters, filters2)
Since client.Containers()
's filters are not functional enough, we need applying filter again after getting the containers.
This does break kubernetes-sigs/kind which makes me pretty sad.
Add the filter options to the nerdctl.
The almost default behavior to add multiple
filter
args is equals to append OR conditions.