From 7a3601ea24f2fa9929f49bda0d5e36989f65db52 Mon Sep 17 00:00:00 2001 From: Nathan Coleman Date: Thu, 14 Apr 2022 18:17:07 -0400 Subject: [PATCH] Add ReferencePolicy to allow cross-namespace routing (#55) * Add ReferencePolicy to allow cross-namespace routing * Remove namespace designation, update name Other resources being deployed to not explicitly specify the namespace that they should be deployed into. This change updates the ReferencePolicy to behave the same way. --- api-gateway/two-services/referencepolicy.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 api-gateway/two-services/referencepolicy.yaml diff --git a/api-gateway/two-services/referencepolicy.yaml b/api-gateway/two-services/referencepolicy.yaml new file mode 100644 index 0000000..9706c12 --- /dev/null +++ b/api-gateway/two-services/referencepolicy.yaml @@ -0,0 +1,12 @@ +apiVersion: gateway.networking.k8s.io/v1alpha2 +kind: ReferencePolicy +metadata: + name: example-reference-policy +spec: + from: + - group: gateway.networking.k8s.io + kind: HTTPRoute + namespace: consul # Must match the namespace that api-gw/routes.yaml is deployed into + to: + - group: "" + kind: Service