diff --git a/armometadata/testdata/networkpolicy_withmatching_labels.json b/armometadata/testdata/networkpolicy_withmatching_labels.json new file mode 100644 index 0000000..caabc92 --- /dev/null +++ b/armometadata/testdata/networkpolicy_withmatching_labels.json @@ -0,0 +1,31 @@ +{ + "apiVersion": "networking.k8s.io/v1", + "kind": "NetworkPolicy", + "metadata": { + "creationTimestamp": "2023-11-16T10:12:35Z", + "name": "allow-frontend-backend", + "namespace": "default" + }, + "spec": { + "podSelector": { + "matchLabels": { + "role": "frontend" + } + }, + "policyTypes": ["Ingress"], + "ingress": [ + { + "from": [ + { + "podSelector": { + "matchLabels": { + "role": "backend" + } + } + } + ] + } + ] + } + } + \ No newline at end of file diff --git a/armometadata/testdata/networkpolicy_withoutmatching_labels.json b/armometadata/testdata/networkpolicy_withoutmatching_labels.json new file mode 100644 index 0000000..640dba3 --- /dev/null +++ b/armometadata/testdata/networkpolicy_withoutmatching_labels.json @@ -0,0 +1,23 @@ +{ + "apiVersion": "networking.k8s.io/v1", + "kind": "NetworkPolicy", + "metadata": { + "creationTimestamp": "2023-11-16T10:12:35Z", + "name": "allow-all-in-namespace", + "namespace": "default" + }, + "spec": { + "podSelector": {}, + "policyTypes": ["Ingress"], + "ingress": [ + { + "from": [ + { + "podSelector": {} + } + ] + } + ] + } + } + \ No newline at end of file