cli: fix node list to show only cluster nodes - #127
Open
HarshwardhanPatil07 wants to merge 2 commits into
Open
Conversation
Collaborator
Author
node list was using a container name prefix filter (name=k8s-) which matched all bink containers including infrastructure ones (DNS, HAProxy). It also did not scope to the requested cluster and displayed node names with the cluster prefix baked in. Switch to label-based filtering (bink.cluster-name) scoped to the active cluster, skip containers that carry a bink.component label, and read node names from the bink.node-name label. Also display the node role when available. Fixes: bootc-dev#108 Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
Add negative assertions to multinode integration tests confirming that DNS and HAProxy containers do not appear in node list output. Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <harshpat@redhat.com>
HarshwardhanPatil07
force-pushed
the
fix-node-list
branch
from
August 24, 2026 07:54
fa841da to
ab714bb
Compare
alicefr
reviewed
Aug 24, 2026
| listOutput := string(listSession.Out.Contents()) | ||
| Expect(listOutput).To(ContainSubstring(node1), "node list should contain node1") | ||
| Expect(listOutput).To(ContainSubstring(node2), "node list should contain node2") | ||
| Expect(listOutput).ToNot(ContainSubstring("dns"), "node list should not show DNS container") |
Collaborator
There was a problem hiding this comment.
Can we move this check to the test https://github.com/bootc-dev/bink/blob/main/test/integration/cluster_test.go#L24 ?
Collaborator
There was a problem hiding this comment.
Also it will be better to check the full list content instead of checking the non existence of the dns
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
fixes bink node list which was showing all containers (DNS, HAProxy, registries) across all clusters instead of only the actual nodes for the requested cluster.
Before (bug):
Found 6 cluster node(s):
After (fixed):
Found 1 cluster node(s):
Fixes: #108