-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate network tests to NetworkNeighborhoods
Signed-off-by: Matthias Bertschy <[email protected]>
- Loading branch information
Showing
21 changed files
with
617 additions
and
566 deletions.
There are no files selected for viewing
8 changes: 5 additions & 3 deletions
8
...pe-crds/supported/networkneighborses.yaml → ...e-crds/supported/networkneighborhood.yaml
This file contains 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
90 changes: 90 additions & 0 deletions
90
configurations/network-policy/expected-network-neighborhood/busybox-known-server.json
This file contains 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,90 @@ | ||
{ | ||
"kind": "NetworkNeighborhood", | ||
"apiVersion": "spdx.softwarecomposition.kubescape.io/v1beta1", | ||
"metadata": { | ||
"name": "deployment-busybox-deployment", | ||
"namespace": "systest-ns-myoi", | ||
"uid": "3ca77764-ca27-492f-b752-ef4560887a28", | ||
"resourceVersion": "1", | ||
"creationTimestamp": "2024-07-03T15:37:19Z", | ||
"labels": { | ||
"kubescape.io/workload-api-group": "apps", | ||
"kubescape.io/workload-api-version": "v1", | ||
"kubescape.io/workload-kind": "Deployment", | ||
"kubescape.io/workload-name": "busybox-deployment" | ||
}, | ||
"annotations": { | ||
"kubescape.io/completion": "complete", | ||
"kubescape.io/status": "ready" | ||
} | ||
}, | ||
"spec": { | ||
"containers": [ | ||
{ | ||
"name": "busybox", | ||
"egress": [ | ||
{ | ||
"identifier": "238053dc2e1cbe8820de562678e8cde84593e95d41e6f1a58bb987741f9e30a3", | ||
"type": "external", | ||
"dns": "", | ||
"ports": [ | ||
{ | ||
"name": "TCP-80", | ||
"protocol": "TCP", | ||
"port": 80 | ||
} | ||
], | ||
"podSelector": null, | ||
"namespaceSelector": null, | ||
"ipAddress": "185.199.108.153" | ||
}, | ||
{ | ||
"identifier": "e5e8ca3d76f701a19b7478fdc1c8c24ccc6cef9902b52c8c7e015439e2a1ddf3", | ||
"type": "internal", | ||
"dns": "", | ||
"ports": [ | ||
{ | ||
"name": "UDP-53", | ||
"protocol": "UDP", | ||
"port": 53 | ||
} | ||
], | ||
"podSelector": { | ||
"matchLabels": { | ||
"k8s-app": "kube-dns" | ||
} | ||
}, | ||
"namespaceSelector": { | ||
"matchLabels": { | ||
"kubernetes.io/metadata.name": "kube-system" | ||
} | ||
}, | ||
"ipAddress": "" | ||
}, | ||
{ | ||
"identifier": "35d62fc884ab3d8896d6be5bad0176619aa60756d33dfa47c9de024902a720c5", | ||
"type": "external", | ||
"dns": "www.google.com.", | ||
"dnsNames": [ | ||
"www.google.com." | ||
], | ||
"ports": [ | ||
{ | ||
"name": "TCP-80", | ||
"protocol": "TCP", | ||
"port": 80 | ||
} | ||
], | ||
"podSelector": null, | ||
"namespaceSelector": null, | ||
"ipAddress": "142.250.179.68" | ||
} | ||
], | ||
"ingress": [] | ||
} | ||
], | ||
"matchLabels": { | ||
"app": "busybox" | ||
} | ||
} | ||
} |
93 changes: 93 additions & 0 deletions
93
configurations/network-policy/expected-network-neighborhood/busybox.json
This file contains 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,93 @@ | ||
{ | ||
"kind": "NetworkNeighborhood", | ||
"apiVersion": "spdx.softwarecomposition.kubescape.io/v1beta1", | ||
"metadata": { | ||
"name": "deployment-busybox-deployment", | ||
"namespace": "systest-ns-rxrl", | ||
"uid": "07e74b42-8ba2-46b1-9de9-f6c33e3b180c", | ||
"resourceVersion": "1", | ||
"creationTimestamp": "2024-07-03T15:30:40Z", | ||
"labels": { | ||
"kubescape.io/workload-api-group": "apps", | ||
"kubescape.io/workload-api-version": "v1", | ||
"kubescape.io/workload-kind": "Deployment", | ||
"kubescape.io/workload-name": "busybox-deployment" | ||
}, | ||
"annotations": { | ||
"kubescape.io/completion": "complete", | ||
"kubescape.io/status": "ready" | ||
} | ||
}, | ||
"spec": { | ||
"containers": [ | ||
{ | ||
"name": "busybox", | ||
"egress": [ | ||
{ | ||
"identifier": "66c89b9fd8bd51e9c16c2eb568c64285e1bf89a98e5eb878c7cfb123246857a6", | ||
"type": "external", | ||
"dns": "google.com.", | ||
"dnsNames": [ | ||
"google.com." | ||
], | ||
"ports": [ | ||
{ | ||
"name": "TCP-80", | ||
"protocol": "TCP", | ||
"port": 80 | ||
} | ||
], | ||
"podSelector": null, | ||
"namespaceSelector": null, | ||
"ipAddress": "142.250.179.78" | ||
}, | ||
{ | ||
"identifier": "35d62fc884ab3d8896d6be5bad0176619aa60756d33dfa47c9de024902a720c5", | ||
"type": "external", | ||
"dns": "www.google.com.", | ||
"dnsNames": [ | ||
"www.google.com." | ||
], | ||
"ports": [ | ||
{ | ||
"name": "TCP-80", | ||
"protocol": "TCP", | ||
"port": 80 | ||
} | ||
], | ||
"podSelector": null, | ||
"namespaceSelector": null, | ||
"ipAddress": "142.250.179.68" | ||
}, | ||
{ | ||
"identifier": "e5e8ca3d76f701a19b7478fdc1c8c24ccc6cef9902b52c8c7e015439e2a1ddf3", | ||
"type": "internal", | ||
"dns": "", | ||
"ports": [ | ||
{ | ||
"name": "UDP-53", | ||
"protocol": "UDP", | ||
"port": 53 | ||
} | ||
], | ||
"podSelector": { | ||
"matchLabels": { | ||
"k8s-app": "kube-dns" | ||
} | ||
}, | ||
"namespaceSelector": { | ||
"matchLabels": { | ||
"kubernetes.io/metadata.name": "kube-system" | ||
} | ||
}, | ||
"ipAddress": "" | ||
} | ||
], | ||
"ingress": [] | ||
} | ||
], | ||
"matchLabels": { | ||
"app": "busybox" | ||
} | ||
} | ||
} |
This file contains 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 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
57 changes: 57 additions & 0 deletions
57
configurations/network-policy/expected-network-neighborhood/deployment-nginx-basic.json
This file contains 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,57 @@ | ||
{ | ||
"kind": "NetworkNeighborhood", | ||
"apiVersion": "spdx.softwarecomposition.kubescape.io/v1beta1", | ||
"metadata": { | ||
"name": "deployment-nginx", | ||
"namespace": "systest-ns-hvt7", | ||
"uid": "389bed91-3f2d-464d-9b70-7d29309162a5", | ||
"resourceVersion": "1", | ||
"creationTimestamp": "2024-07-03T15:42:51Z", | ||
"labels": { | ||
"kubescape.io/workload-api-group": "apps", | ||
"kubescape.io/workload-api-version": "v1", | ||
"kubescape.io/workload-kind": "Deployment", | ||
"kubescape.io/workload-name": "nginx" | ||
}, | ||
"annotations": { | ||
"kubescape.io/completion": "complete", | ||
"kubescape.io/status": "ready" | ||
} | ||
}, | ||
"spec": { | ||
"matchLabels": { | ||
"app": "nginx" | ||
}, | ||
"containers": [ | ||
{ | ||
"name": "nginx", | ||
"ingress": [], | ||
"egress": [ | ||
{ | ||
"identifier": "e5e8ca3d76f701a19b7478fdc1c8c24ccc6cef9902b52c8c7e015439e2a1ddf3", | ||
"type": "internal", | ||
"dns": "", | ||
"ports": [ | ||
{ | ||
"name": "UDP-53", | ||
"protocol": "UDP", | ||
"port": 53 | ||
} | ||
], | ||
"podSelector": { | ||
"matchLabels": { | ||
"k8s-app": "kube-dns" | ||
} | ||
}, | ||
"namespaceSelector": { | ||
"matchLabels": { | ||
"kubernetes.io/metadata.name": "kube-system" | ||
} | ||
}, | ||
"ipAddress": "" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} |
This file contains 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
Oops, something went wrong.