Skip to content

Commit

Permalink
Merge branch 'main' into live_cluster_with_anp
Browse files Browse the repository at this point in the history
  • Loading branch information
shireenf-ibm authored Jan 14, 2025
2 parents b0e7552 + 2739fa6 commit c8c03a9
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 91 deletions.
28 changes: 14 additions & 14 deletions test_outputs/connlist/anp_banp_blog_demo_connlist_output.csv
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
src,dst,conn
0.0.0.0-255.255.255.255,bar/my-bar[Pod],All Connections
0.0.0.0-255.255.255.255,baz/my-baz[Pod],All Connections
0.0.0.0-255.255.255.255,monitoring/my-monitoring[Pod],All Connections
bar/my-bar[Pod],0.0.0.0-255.255.255.255,All Connections
bar/my-bar[Pod],baz/my-baz[Pod],All Connections
bar/my-bar[Pod],monitoring/my-monitoring[Pod],All Connections
baz/my-baz[Pod],0.0.0.0-255.255.255.255,All Connections
baz/my-baz[Pod],monitoring/my-monitoring[Pod],All Connections
foo/my-foo[Pod],0.0.0.0-255.255.255.255,All Connections
foo/my-foo[Pod],baz/my-baz[Pod],All Connections
foo/my-foo[Pod],monitoring/my-monitoring[Pod],All Connections
monitoring/my-monitoring[Pod],0.0.0.0-255.255.255.255,All Connections
monitoring/my-monitoring[Pod],baz/my-baz[Pod],All Connections
monitoring/my-monitoring[Pod],foo/my-foo[Pod],All Connections
0.0.0.0-255.255.255.255,bar/mybar[Pod],All Connections
0.0.0.0-255.255.255.255,baz/mybaz[Pod],All Connections
0.0.0.0-255.255.255.255,monitoring/mymonitoring[Pod],All Connections
bar/mybar[Pod],0.0.0.0-255.255.255.255,All Connections
bar/mybar[Pod],baz/mybaz[Pod],All Connections
bar/mybar[Pod],monitoring/mymonitoring[Pod],All Connections
baz/mybaz[Pod],0.0.0.0-255.255.255.255,All Connections
baz/mybaz[Pod],monitoring/mymonitoring[Pod],All Connections
foo/myfoo[Pod],0.0.0.0-255.255.255.255,All Connections
foo/myfoo[Pod],baz/mybaz[Pod],All Connections
foo/myfoo[Pod],monitoring/mymonitoring[Pod],All Connections
monitoring/mymonitoring[Pod],0.0.0.0-255.255.255.255,All Connections
monitoring/mymonitoring[Pod],baz/mybaz[Pod],All Connections
monitoring/mymonitoring[Pod],foo/myfoo[Pod],All Connections
36 changes: 18 additions & 18 deletions test_outputs/connlist/anp_banp_blog_demo_connlist_output.dot
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,40 @@ digraph {
subgraph "cluster_bar" {
color="black"
fontcolor="black"
"bar/my-bar[Pod]" [label="my-bar[Pod]" color="blue" fontcolor="blue"]
"bar/mybar[Pod]" [label="mybar[Pod]" color="blue" fontcolor="blue"]
label="bar"
}
subgraph "cluster_baz" {
color="black"
fontcolor="black"
"baz/my-baz[Pod]" [label="my-baz[Pod]" color="blue" fontcolor="blue"]
"baz/mybaz[Pod]" [label="mybaz[Pod]" color="blue" fontcolor="blue"]
label="baz"
}
subgraph "cluster_foo" {
color="black"
fontcolor="black"
"foo/my-foo[Pod]" [label="my-foo[Pod]" color="blue" fontcolor="blue"]
"foo/myfoo[Pod]" [label="myfoo[Pod]" color="blue" fontcolor="blue"]
label="foo"
}
subgraph "cluster_monitoring" {
color="black"
fontcolor="black"
"monitoring/my-monitoring[Pod]" [label="my-monitoring[Pod]" color="blue" fontcolor="blue"]
"monitoring/mymonitoring[Pod]" [label="mymonitoring[Pod]" color="blue" fontcolor="blue"]
label="monitoring"
}
"0.0.0.0-255.255.255.255" [label="0.0.0.0-255.255.255.255" color="red2" fontcolor="red2"]
"0.0.0.0-255.255.255.255" -> "bar/my-bar[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=0.5]
"0.0.0.0-255.255.255.255" -> "baz/my-baz[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=0.5]
"0.0.0.0-255.255.255.255" -> "monitoring/my-monitoring[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=0.5]
"bar/my-bar[Pod]" -> "0.0.0.0-255.255.255.255" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=1]
"bar/my-bar[Pod]" -> "baz/my-baz[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=0.5]
"bar/my-bar[Pod]" -> "monitoring/my-monitoring[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=0.5]
"baz/my-baz[Pod]" -> "0.0.0.0-255.255.255.255" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=1]
"baz/my-baz[Pod]" -> "monitoring/my-monitoring[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=0.5]
"foo/my-foo[Pod]" -> "0.0.0.0-255.255.255.255" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=1]
"foo/my-foo[Pod]" -> "baz/my-baz[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=1]
"foo/my-foo[Pod]" -> "monitoring/my-monitoring[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=0.5]
"monitoring/my-monitoring[Pod]" -> "0.0.0.0-255.255.255.255" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=1]
"monitoring/my-monitoring[Pod]" -> "baz/my-baz[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=1]
"monitoring/my-monitoring[Pod]" -> "foo/my-foo[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=1]
"0.0.0.0-255.255.255.255" -> "bar/mybar[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=0.5]
"0.0.0.0-255.255.255.255" -> "baz/mybaz[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=0.5]
"0.0.0.0-255.255.255.255" -> "monitoring/mymonitoring[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=0.5]
"bar/mybar[Pod]" -> "0.0.0.0-255.255.255.255" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=1]
"bar/mybar[Pod]" -> "baz/mybaz[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=0.5]
"bar/mybar[Pod]" -> "monitoring/mymonitoring[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=0.5]
"baz/mybaz[Pod]" -> "0.0.0.0-255.255.255.255" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=1]
"baz/mybaz[Pod]" -> "monitoring/mymonitoring[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=0.5]
"foo/myfoo[Pod]" -> "0.0.0.0-255.255.255.255" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=1]
"foo/myfoo[Pod]" -> "baz/mybaz[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=1]
"foo/myfoo[Pod]" -> "monitoring/mymonitoring[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=0.5]
"monitoring/mymonitoring[Pod]" -> "0.0.0.0-255.255.255.255" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=1]
"monitoring/mymonitoring[Pod]" -> "baz/mybaz[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=1]
"monitoring/mymonitoring[Pod]" -> "foo/myfoo[Pod]" [label="All Connections" color="gold2" fontcolor="darkgreen" weight=1]
}
42 changes: 21 additions & 21 deletions test_outputs/connlist/anp_banp_blog_demo_connlist_output.json
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
[
{
"src": "0.0.0.0-255.255.255.255",
"dst": "bar/my-bar[Pod]",
"dst": "bar/mybar[Pod]",
"conn": "All Connections"
},
{
"src": "0.0.0.0-255.255.255.255",
"dst": "baz/my-baz[Pod]",
"dst": "baz/mybaz[Pod]",
"conn": "All Connections"
},
{
"src": "0.0.0.0-255.255.255.255",
"dst": "monitoring/my-monitoring[Pod]",
"dst": "monitoring/mymonitoring[Pod]",
"conn": "All Connections"
},
{
"src": "bar/my-bar[Pod]",
"src": "bar/mybar[Pod]",
"dst": "0.0.0.0-255.255.255.255",
"conn": "All Connections"
},
{
"src": "bar/my-bar[Pod]",
"dst": "baz/my-baz[Pod]",
"src": "bar/mybar[Pod]",
"dst": "baz/mybaz[Pod]",
"conn": "All Connections"
},
{
"src": "bar/my-bar[Pod]",
"dst": "monitoring/my-monitoring[Pod]",
"src": "bar/mybar[Pod]",
"dst": "monitoring/mymonitoring[Pod]",
"conn": "All Connections"
},
{
"src": "baz/my-baz[Pod]",
"src": "baz/mybaz[Pod]",
"dst": "0.0.0.0-255.255.255.255",
"conn": "All Connections"
},
{
"src": "baz/my-baz[Pod]",
"dst": "monitoring/my-monitoring[Pod]",
"src": "baz/mybaz[Pod]",
"dst": "monitoring/mymonitoring[Pod]",
"conn": "All Connections"
},
{
"src": "foo/my-foo[Pod]",
"src": "foo/myfoo[Pod]",
"dst": "0.0.0.0-255.255.255.255",
"conn": "All Connections"
},
{
"src": "foo/my-foo[Pod]",
"dst": "baz/my-baz[Pod]",
"src": "foo/myfoo[Pod]",
"dst": "baz/mybaz[Pod]",
"conn": "All Connections"
},
{
"src": "foo/my-foo[Pod]",
"dst": "monitoring/my-monitoring[Pod]",
"src": "foo/myfoo[Pod]",
"dst": "monitoring/mymonitoring[Pod]",
"conn": "All Connections"
},
{
"src": "monitoring/my-monitoring[Pod]",
"src": "monitoring/mymonitoring[Pod]",
"dst": "0.0.0.0-255.255.255.255",
"conn": "All Connections"
},
{
"src": "monitoring/my-monitoring[Pod]",
"dst": "baz/my-baz[Pod]",
"src": "monitoring/mymonitoring[Pod]",
"dst": "baz/mybaz[Pod]",
"conn": "All Connections"
},
{
"src": "monitoring/my-monitoring[Pod]",
"dst": "foo/my-foo[Pod]",
"src": "monitoring/mymonitoring[Pod]",
"dst": "foo/myfoo[Pod]",
"conn": "All Connections"
}
]
28 changes: 14 additions & 14 deletions test_outputs/connlist/anp_banp_blog_demo_connlist_output.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
| src | dst | conn |
|-----|-----|------|
| 0.0.0.0-255.255.255.255 | bar/my-bar[Pod] | All Connections |
| 0.0.0.0-255.255.255.255 | baz/my-baz[Pod] | All Connections |
| 0.0.0.0-255.255.255.255 | monitoring/my-monitoring[Pod] | All Connections |
| bar/my-bar[Pod] | 0.0.0.0-255.255.255.255 | All Connections |
| bar/my-bar[Pod] | baz/my-baz[Pod] | All Connections |
| bar/my-bar[Pod] | monitoring/my-monitoring[Pod] | All Connections |
| baz/my-baz[Pod] | 0.0.0.0-255.255.255.255 | All Connections |
| baz/my-baz[Pod] | monitoring/my-monitoring[Pod] | All Connections |
| foo/my-foo[Pod] | 0.0.0.0-255.255.255.255 | All Connections |
| foo/my-foo[Pod] | baz/my-baz[Pod] | All Connections |
| foo/my-foo[Pod] | monitoring/my-monitoring[Pod] | All Connections |
| monitoring/my-monitoring[Pod] | 0.0.0.0-255.255.255.255 | All Connections |
| monitoring/my-monitoring[Pod] | baz/my-baz[Pod] | All Connections |
| monitoring/my-monitoring[Pod] | foo/my-foo[Pod] | All Connections |
| 0.0.0.0-255.255.255.255 | bar/mybar[Pod] | All Connections |
| 0.0.0.0-255.255.255.255 | baz/mybaz[Pod] | All Connections |
| 0.0.0.0-255.255.255.255 | monitoring/mymonitoring[Pod] | All Connections |
| bar/mybar[Pod] | 0.0.0.0-255.255.255.255 | All Connections |
| bar/mybar[Pod] | baz/mybaz[Pod] | All Connections |
| bar/mybar[Pod] | monitoring/mymonitoring[Pod] | All Connections |
| baz/mybaz[Pod] | 0.0.0.0-255.255.255.255 | All Connections |
| baz/mybaz[Pod] | monitoring/mymonitoring[Pod] | All Connections |
| foo/myfoo[Pod] | 0.0.0.0-255.255.255.255 | All Connections |
| foo/myfoo[Pod] | baz/mybaz[Pod] | All Connections |
| foo/myfoo[Pod] | monitoring/mymonitoring[Pod] | All Connections |
| monitoring/mymonitoring[Pod] | 0.0.0.0-255.255.255.255 | All Connections |
| monitoring/mymonitoring[Pod] | baz/mybaz[Pod] | All Connections |
| monitoring/mymonitoring[Pod] | foo/myfoo[Pod] | All Connections |
28 changes: 14 additions & 14 deletions test_outputs/connlist/anp_banp_blog_demo_connlist_output.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
0.0.0.0-255.255.255.255 => bar/my-bar[Pod] : All Connections
0.0.0.0-255.255.255.255 => baz/my-baz[Pod] : All Connections
0.0.0.0-255.255.255.255 => monitoring/my-monitoring[Pod] : All Connections
bar/my-bar[Pod] => 0.0.0.0-255.255.255.255 : All Connections
bar/my-bar[Pod] => baz/my-baz[Pod] : All Connections
bar/my-bar[Pod] => monitoring/my-monitoring[Pod] : All Connections
baz/my-baz[Pod] => 0.0.0.0-255.255.255.255 : All Connections
baz/my-baz[Pod] => monitoring/my-monitoring[Pod] : All Connections
foo/my-foo[Pod] => 0.0.0.0-255.255.255.255 : All Connections
foo/my-foo[Pod] => baz/my-baz[Pod] : All Connections
foo/my-foo[Pod] => monitoring/my-monitoring[Pod] : All Connections
monitoring/my-monitoring[Pod] => 0.0.0.0-255.255.255.255 : All Connections
monitoring/my-monitoring[Pod] => baz/my-baz[Pod] : All Connections
monitoring/my-monitoring[Pod] => foo/my-foo[Pod] : All Connections
0.0.0.0-255.255.255.255 => bar/mybar[Pod] : All Connections
0.0.0.0-255.255.255.255 => baz/mybaz[Pod] : All Connections
0.0.0.0-255.255.255.255 => monitoring/mymonitoring[Pod] : All Connections
bar/mybar[Pod] => 0.0.0.0-255.255.255.255 : All Connections
bar/mybar[Pod] => baz/mybaz[Pod] : All Connections
bar/mybar[Pod] => monitoring/mymonitoring[Pod] : All Connections
baz/mybaz[Pod] => 0.0.0.0-255.255.255.255 : All Connections
baz/mybaz[Pod] => monitoring/mymonitoring[Pod] : All Connections
foo/myfoo[Pod] => 0.0.0.0-255.255.255.255 : All Connections
foo/myfoo[Pod] => baz/mybaz[Pod] : All Connections
foo/myfoo[Pod] => monitoring/mymonitoring[Pod] : All Connections
monitoring/mymonitoring[Pod] => 0.0.0.0-255.255.255.255 : All Connections
monitoring/mymonitoring[Pod] => baz/mybaz[Pod] : All Connections
monitoring/mymonitoring[Pod] => foo/myfoo[Pod] : All Connections
4 changes: 2 additions & 2 deletions tests/anp_banp_blog_demo/policies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: allow-monitoring
namespace: foo
spec:
podSelector:
podSelector: {}
policyTypes:
- Ingress
ingress:
Expand Down Expand Up @@ -69,4 +69,4 @@ spec:
from:
- namespaces:
matchLabels:
kubernetes.io/metadata.name: monitoring
kubernetes.io/metadata.name: monitoring
16 changes: 8 additions & 8 deletions tests/anp_banp_blog_demo/workloads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apiVersion: v1
kind: Pod
metadata:
namespace: foo
name: my-foo
name: myfoo
labels:
security: internal
spec:
containers:
- name: myfirstContainer
- name: myfirstcontainer
image: fooimage

---
Expand All @@ -16,12 +16,12 @@ apiVersion: v1
kind: Pod
metadata:
namespace: bar
name: my-bar
name: mybar
labels:
security: internal
spec:
containers:
- name: myfirstContainer
- name: myfirstcontainer
image: barimage

---
Expand All @@ -30,12 +30,12 @@ apiVersion: v1
kind: Pod
metadata:
namespace: baz
name: my-baz
name: mybaz
labels:
security: none
spec:
containers:
- name: myfirstContainer
- name: myfirstcontainer
image: bazimage

---
Expand All @@ -44,12 +44,12 @@ apiVersion: v1
kind: Pod
metadata:
namespace: monitoring
name: my-monitoring
name: mymonitoring
labels:
security: monitoring
spec:
containers:
- name: myfirstContainer
- name: myfirstcontainer
image: monitoringimage

---
Expand Down

0 comments on commit c8c03a9

Please sign in to comment.