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

list network with labelselector not working in operator #232

Open
Abirdcfly opened this issue Apr 10, 2023 · 0 comments
Open

list network with labelselector not working in operator #232

Abirdcfly opened this issue Apr 10, 2023 · 0 comments
Labels
bug Something isn't working low Low Priority

Comments

@Abirdcfly
Copy link
Member

see https://github.com/bestchains/fabric-operator/pull/224/files#diff-aaf25efa7147cfaef6c204ac24887f2e23eab5eefe99850acad74c24b9e743f1R249-R293 for detail.

	n1 := &current.NetworkList{}
	_ = c.List(context.TODO(), n1)
	for i, u := range n1.Items {
		log.Info(fmt.Sprintf("full %d, name:%s, label:%s", i, u.Name, u.Labels))
	}

	selector := labels.SelectorFromSet(map[string]string{"bestchains.network.federation": "federation-sample"})
	n2 := &current.NetworkList{}
	_ = c.List(context.TODO(), n2, &client.ListOptions{LabelSelector: selector})

The phenomenon is that n1 does query a network, and the label contains bestchains.network.federation: federation-sample, but n2 does not query the result.

@Abirdcfly Abirdcfly added bug Something isn't working low Low Priority labels Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low Low Priority
Projects
None yet
Development

No branches or pull requests

1 participant