Enable Istio on IEC type2
[iec.git] / src / use_cases / service_mesh / bookinfo / config / bookinfo-gateway.yaml
diff --git a/src/use_cases/service_mesh/bookinfo/config/bookinfo-gateway.yaml b/src/use_cases/service_mesh/bookinfo/config/bookinfo-gateway.yaml
new file mode 100644 (file)
index 0000000..ff2800c
--- /dev/null
@@ -0,0 +1,42 @@
+# yamllint disable rule:hyphens rule:commas rule:indentation rule:line-length rule:comments
+apiVersion: networking.istio.io/v1alpha3
+kind: Gateway
+metadata:
+  name: bookinfo-gateway
+spec:
+  selector:
+    istio: ingressgateway # use istio default controller
+  servers:
+  - port:
+      number: 80
+      name: http
+      protocol: HTTP
+    hosts:
+    - "*"
+---
+apiVersion: networking.istio.io/v1alpha3
+kind: VirtualService
+metadata:
+  name: bookinfo
+spec:
+  hosts:
+  - "*"
+  gateways:
+  - bookinfo-gateway
+  http:
+  - match:
+    - uri:
+        exact: /productpage
+    - uri:
+        prefix: /static
+    - uri:
+        exact: /login
+    - uri:
+        exact: /logout
+    - uri:
+        prefix: /api/v1/products
+    route:
+    - destination:
+        host: productpage
+        port:
+          number: 9080