From 66785d3a39b423ac197bb49b97474e3eefc53020 Mon Sep 17 00:00:00 2001 From: tuna Date: Fri, 6 Sep 2024 17:58:18 +0200 Subject: [PATCH] fix --- .../istio-gateway-virtualService.yaml | 66 ++++++++++++++++--- 1 file changed, 56 insertions(+), 10 deletions(-) diff --git a/manifests/blog-app/istio-gateway-virtualService.yaml b/manifests/blog-app/istio-gateway-virtualService.yaml index d346744..6a80c6c 100644 --- a/manifests/blog-app/istio-gateway-virtualService.yaml +++ b/manifests/blog-app/istio-gateway-virtualService.yaml @@ -1,22 +1,71 @@ -# Gateway is a CustomResourceDefinition that helps to define how the external-traffic should be handled -apiVersion: networking.istio.io/v1 +# # Gateway is a CustomResourceDefinition that helps to define how the external-traffic should be handled +# apiVersion: networking.istio.io/v1 +# kind: Gateway +# metadata: +# name: blog-app-gateway +# namespace: istio-system +# spec: +# selector: +# # istio-ingress service (which was deployed to namespace istio-ingress) has the following label +# istio: ingress +# servers: +# - port: +# number: 80 +# name: http +# protocol: HTTP +# # Accepts traffic from any hostname. It’s like saying, “I don’t care who’s knocking, let everyone in.” +# # hosts: ["myblog.com"]: Accepts traffic only for myblog.coms +# hosts: +# - "blogapp.magdalani.com" +# --- +# apiVersion: networking.istio.io/v1alpha3 +# kind: VirtualService +# metadata: +# name: blog-app +# namespace: blog-app +# spec: +# hosts: +# - "*" +# gateways: +# - blog-app-gateway +# http: +# - match: +# - uri: +# exact: / +# - uri: +# prefix: /static +# - uri: +# prefix: /posts +# - uri: +# exact: /login +# - uri: +# exact: /logout +# - uri: +# exact: /register +# - uri: +# exact: /updateprofile +# route: +# - destination: +# host: frontend +# port: +# number: 80 + + +apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata: name: blog-app-gateway - namespace: istio-system + namespace: blog-app spec: selector: - # istio-ingress service (which was deployed to namespace istio-ingress) has the following label istio: ingress servers: - port: number: 80 name: http protocol: HTTP - # Accepts traffic from any hostname. It’s like saying, “I don’t care who’s knocking, let everyone in.” - # hosts: ["myblog.com"]: Accepts traffic only for myblog.coms hosts: - - "blogapp.magdalani.com" + - "*" --- apiVersion: networking.istio.io/v1alpha3 kind: VirtualService @@ -49,6 +98,3 @@ spec: host: frontend port: number: 80 - - -