From e4e9e7ca00d5add90cb0ac5db8839ea74574011a Mon Sep 17 00:00:00 2001 From: Matthias Bertschy Date: Wed, 15 Jan 2025 08:27:24 +0100 Subject: [PATCH] adding failing test Signed-off-by: Matthias Bertschy --- .../test/failed_with_service_nodeport/expected.json | 3 ++- .../failed_with_service_nodeport/input/service.yaml | 1 + .../input/service2.yaml | 13 +++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 rules/exposure-to-internet/test/failed_with_service_nodeport/input/service2.yaml diff --git a/rules/exposure-to-internet/test/failed_with_service_nodeport/expected.json b/rules/exposure-to-internet/test/failed_with_service_nodeport/expected.json index f7b9f7d97..e08a934f7 100644 --- a/rules/exposure-to-internet/test/failed_with_service_nodeport/expected.json +++ b/rules/exposure-to-internet/test/failed_with_service_nodeport/expected.json @@ -23,7 +23,8 @@ "apiVersion": "v1", "kind": "Service", "metadata": { - "name": "my-service" + "name": "my-service", + "namespace": "ns1" }, "spec": { "ports": [ diff --git a/rules/exposure-to-internet/test/failed_with_service_nodeport/input/service.yaml b/rules/exposure-to-internet/test/failed_with_service_nodeport/input/service.yaml index 94654bcb9..7a8cd132d 100644 --- a/rules/exposure-to-internet/test/failed_with_service_nodeport/input/service.yaml +++ b/rules/exposure-to-internet/test/failed_with_service_nodeport/input/service.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Service metadata: name: my-service + namespace: ns1 spec: selector: app: argo-server diff --git a/rules/exposure-to-internet/test/failed_with_service_nodeport/input/service2.yaml b/rules/exposure-to-internet/test/failed_with_service_nodeport/input/service2.yaml new file mode 100644 index 000000000..73dfe2737 --- /dev/null +++ b/rules/exposure-to-internet/test/failed_with_service_nodeport/input/service2.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: my-service2 + namespace: ns2 +spec: + selector: + app: argo-server + type: NodePort + ports: + - port: 80 + targetPort: 80 + nodePort: 30008