diff --git a/manifests/blog-app/istio-destination-rules.yaml b/manifests/blog-app/istio-destination-rules.yaml index cb62eb2..48b2487 100644 --- a/manifests/blog-app/istio-destination-rules.yaml +++ b/manifests/blog-app/istio-destination-rules.yaml @@ -1,3 +1,7 @@ +# DestinationRule resource handles how the destination should handle incoming traffic. +# In this manifest file, we are defining 'subsets' for each version of the service. +# Then, these subsets are getting used in virtual-services-canary.yaml file to route incoming traffic. +--- apiVersion: networking.istio.io/v1 kind: DestinationRule metadata: diff --git a/manifests/blog-app/istio-gateway-virtualService.yaml b/manifests/blog-app/istio-gateway-virtualService.yaml index 63a7725..c2f87e5 100644 --- a/manifests/blog-app/istio-gateway-virtualService.yaml +++ b/manifests/blog-app/istio-gateway-virtualService.yaml @@ -1,5 +1,5 @@ # Gateway is a CustomResourceDefinition that helps to define how the external-traffic should be handled -apiVersion: networking.istio.io/v1alpha3 +apiVersion: networking.istio.io/v1 kind: Gateway metadata: name: blog-app-gateway @@ -18,7 +18,7 @@ spec: # hosts: ["myblog.com"]: Accepts traffic only for myblog.com - "*" --- -apiVersion: networking.istio.io/v1alpha3 +apiVersion: networking.istio.io/v1 kind: VirtualService metadata: name: blog-app @@ -26,6 +26,10 @@ metadata: spec: hosts: - "*" + # This VirtualService specifies a gateway (blog-app-gateway). + # This indicates that it controls external traffic entering the mesh via this gateway. + # The gateway listens for incoming requests from outside the cluster (e.g., users accessing your app via a web browser) + # and forwards them to services inside the mesh based on the rules defined in the VirtualService. gateways: - blog-app-gateway http: diff --git a/manifests/blog-app/virtual-services-canary.yaml b/manifests/blog-app/virtual-services-canary.yaml index 0409a29..1a58b16 100644 --- a/manifests/blog-app/virtual-services-canary.yaml +++ b/manifests/blog-app/virtual-services-canary.yaml @@ -1,3 +1,6 @@ +# VirtualService that are defined in this manifest file don't specify gateway (spec.gateway). +# This means that they are only handling internal service-to-service communication within the mesh. + --- apiVersion: networking.istio.io/v1 kind: VirtualService