Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ definition:
- Deployment
connected_resource_types:
- NetworkPolicy
- CiliumNetworkPolicy
- CiliumClusterwideNetworkPolicy
78 changes: 78 additions & 0 deletions tests/kubernetes/graph/resources/cilium_network_policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: app-with-cilium-policy
labels:
app: test-app
spec:
selector:
matchLabels:
app: test-app
template:
metadata:
labels:
app: test-app
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: test-cilium-policy
namespace: default
spec:
endpointSelector:
matchLabels:
app: test-app
policyTypes:
- Ingress
- Egress
ingress:
- fromEndpoints:
- matchLabels:
app: allowed-client
egress:
- toEndpoints:
- matchLabels:
app: backend
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: app-with-clusterwide-policy
labels:
app: cluster-app
spec:
selector:
matchLabels:
app: cluster-app
template:
metadata:
labels:
app: cluster-app
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
---
apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
name: test-clusterwide-policy
spec:
endpointSelector:
matchLabels:
app: cluster-app
policyTypes:
- Ingress
- Egress
ingress:
- fromEndpoints:
- matchLabels:
app: allowed-client
Loading