-
Notifications
You must be signed in to change notification settings - Fork 21
test(component): add Test_34 NetworkNeighbors CIDR collapse e2e to Matthias CIDR Collapse #861
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
Merged
matthyx
merged 8 commits into
kubescape:main
from
k8sstormcenter:ct/networkneighbors-cidr-collapse
Jul 28, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8645b2a
test(component): add Test_34 NetworkNeighbors CIDR collapse e2e
b63fc26
test(component): drive Test_34 collapse via CollapseConfiguration CR …
99bbcab
test 34 adding confusion tests where multiple things collapse
entlein d6191de
test 34 first wait for the config to be set , next step create the ex…
entlein 94edfa9
test 34 with external network "probe" the multiple to-be-collapsed en…
entlein 01a55ef
grouping CIDRs to avoid dedup, must be built against addon storage PR
entlein a77453e
rewrote to address review, lets retest
entlein 7ab815f
ci(component): run Test_34 in the matrix, drop unused cidr-fanout fix…
matthyx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: cidr-spread | ||
| labels: | ||
| app: cidr-spread | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: cidr-spread | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: cidr-spread | ||
| spec: | ||
| containers: | ||
| - name: spread | ||
| image: busybox | ||
| command: ["sh", "-c"] | ||
| # Egress to IPs spread across the whole third octet of 52.216.0.0/16 | ||
| # (0..255, including both extremes so the common prefix is exactly the | ||
| # /16 boundary). With a /16 floor this collapses to a single 52.216.0.0/16; | ||
| # with a /24 floor it splits into one /24 per distinct third octet. | ||
| args: | ||
| - "while true; do for o3 in 0 20 40 64 96 128 160 192 224 255; do for o4 in 1 2 3; do nc -w 1 -z 52.216.$o3.$o4 443 2>/dev/null; done; done; sleep 2; done" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: s3-full-27 | ||
| labels: | ||
| app: s3-full-27 | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: s3-full-27 | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: s3-full-27 | ||
| spec: | ||
| containers: | ||
| - name: c | ||
| image: busybox | ||
| command: ["sh", "-c"] | ||
| # AWS S3 (52.216.0.0/15): fully observe the /27 52.216.2.0/27 | ||
| args: | ||
| - "while true; do for i in $(seq 0 31); do nc -w 1 -z 52.216.2.$i 443 2>/dev/null; done; sleep 2; done" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: s3-full-28 | ||
| labels: | ||
| app: s3-full-28 | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: s3-full-28 | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: s3-full-28 | ||
| spec: | ||
| containers: | ||
| - name: c | ||
| image: busybox | ||
| command: ["sh", "-c"] | ||
| # AWS S3 (52.216.0.0/15): fully observe the /28 52.216.1.0/28 | ||
| args: | ||
| - "while true; do for i in $(seq 0 15); do nc -w 1 -z 52.216.1.$i 443 2>/dev/null; done; sleep 2; done" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: cloud-scattered | ||
| labels: | ||
| app: cloud-scattered | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: cloud-scattered | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: cloud-scattered | ||
| spec: | ||
| containers: | ||
| - name: c | ||
| image: busybox | ||
| command: ["sh", "-c"] | ||
| # Scattered real IPs across AWS S3 / Cloudflare / Azure / GCP, each in a | ||
| # distinct /16. Above the group threshold and sharing no common prefix as | ||
| # long as the floor, they bucket to one /16 apiece under a /16 floor | ||
| # (bounded output), rather than staying as unbounded per-host /32s. | ||
| args: | ||
| - "while true; do for ip in 52.216.10.20 52.217.50.100 104.16.100.50 172.64.200.10 20.150.10.5 13.107.6.152 34.120.50.10 35.190.20.30; do nc -w 1 -z $ip 443 2>/dev/null; done; sleep 2; done" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: cf-v6-124 | ||
| labels: | ||
| app: cf-v6-124 | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: cf-v6-124 | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: cf-v6-124 | ||
| spec: | ||
| containers: | ||
| - name: c | ||
| image: busybox | ||
| command: ["sh", "-c"] | ||
| # Cloudflare IPv6 (2606:4700::/32): fully observe the /124 2606:4700:0:1::/124 | ||
| args: | ||
| - "while true; do for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do nc -w 1 -z 2606:4700:0:1::$i 443 2>/dev/null; done; sleep 2; done" |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Restore a pre-existing CollapseConfiguration.
applyCollapseFloorupdatesdefaultwhen it already exists, but Line 3382 always deletes it. Running this test can therefore remove cluster configuration owned by the environment or another test. Snapshot whetherdefaultexisted before mutation; restore its previous spec on cleanup, and delete it only when this test created it.🤖 Prompt for AI Agents