From 806e60f83d6a2bc624c91fca97d5344892f0b220 Mon Sep 17 00:00:00 2001 From: Kfir Toledo Date: Mon, 1 Apr 2024 11:23:27 +0300 Subject: [PATCH] policyengine/examples: Fix JSONs to support CRD mode (#474) Update JSONs' policy to support policy CRD. Signed-off-by: Kfir Toledo --- pkg/policyengine/examples/allowAll.json | 7 ++++++- pkg/policyengine/examples/allowToReviews.json | 7 ++++++- pkg/policyengine/examples/deny_from_gw1.json | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/pkg/policyengine/examples/allowAll.json b/pkg/policyengine/examples/allowAll.json index 355f1956..28f2205f 100644 --- a/pkg/policyengine/examples/allowAll.json +++ b/pkg/policyengine/examples/allowAll.json @@ -1,5 +1,10 @@ { - "name": "allow-all", + "kind": "AccessPolicy", + "apiVersion": "clusterlink.net/v1alpha1", + "metadata": { + "name": "allow-all", + "namespace": "default" + }, "spec": { "action": "allow", "from": [ diff --git a/pkg/policyengine/examples/allowToReviews.json b/pkg/policyengine/examples/allowToReviews.json index f533633d..f813d9b9 100644 --- a/pkg/policyengine/examples/allowToReviews.json +++ b/pkg/policyengine/examples/allowToReviews.json @@ -1,5 +1,10 @@ { - "name": "allow-to-reviews", + "kind": "AccessPolicy", + "apiVersion": "clusterlink.net/v1alpha1", + "metadata": { + "name": "allow-to-reviews", + "namespace": "default" + }, "spec": { "action": "allow", "from": [ diff --git a/pkg/policyengine/examples/deny_from_gw1.json b/pkg/policyengine/examples/deny_from_gw1.json index 51712f81..402c13cb 100644 --- a/pkg/policyengine/examples/deny_from_gw1.json +++ b/pkg/policyengine/examples/deny_from_gw1.json @@ -1,5 +1,10 @@ { - "name": "deny-from-gw1", + "kind": "AccessPolicy", + "apiVersion": "clusterlink.net/v1alpha1", + "metadata": { + "name": "deny-from-gw1", + "namespace": "default" + }, "spec": { "action": "deny", "from": [