diff --git a/rules/exposure-to-internet/test/failed_with_ingress/expected.json b/rules/exposure-to-internet/test/failed_with_ingress/expected.json index 958f9eaf0..5ce02f86b 100644 --- a/rules/exposure-to-internet/test/failed_with_ingress/expected.json +++ b/rules/exposure-to-internet/test/failed_with_ingress/expected.json @@ -23,7 +23,8 @@ "apiVersion": "networking.k8s.io/v1", "kind": "Ingress", "metadata": { - "name": "my-ingress" + "name": "my-ingress", + "namespace": "default" }, "spec": { "ingressClassName": "nginx", @@ -54,6 +55,28 @@ "spec.rules[0].http.paths[0].backend.service.name" ], "fixPaths": null + }, + { + "object": { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "my-service", + "namespace": "default" + }, + "spec": { + "ports": [ + { + "port": 80, + "targetPort": 80 + } + ], + "selector": { + "app": "my-app" + }, + "type": "ClusterIP" + } + } } ] } diff --git a/rules/exposure-to-internet/test/failed_with_ingress/input/ingress.yaml b/rules/exposure-to-internet/test/failed_with_ingress/input/ingress.yaml index 096c24a22..4cc9b174d 100644 --- a/rules/exposure-to-internet/test/failed_with_ingress/input/ingress.yaml +++ b/rules/exposure-to-internet/test/failed_with_ingress/input/ingress.yaml @@ -2,6 +2,7 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: my-ingress + namespace: default spec: ingressClassName: nginx rules: diff --git a/rules/exposure-to-internet/test/failed_with_ingress/input/service.yaml b/rules/exposure-to-internet/test/failed_with_ingress/input/service.yaml index 7ba441575..9ad14d173 100644 --- a/rules/exposure-to-internet/test/failed_with_ingress/input/service.yaml +++ b/rules/exposure-to-internet/test/failed_with_ingress/input/service.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Service metadata: name: my-service + namespace: default spec: selector: app: my-app