From f787f24917a2d61fcb32c8f1c52c40797c68b73e Mon Sep 17 00:00:00 2001 From: locmai-kms Date: Sun, 28 Apr 2019 19:29:18 +0700 Subject: [PATCH] test istio crd --- guestbook/guestbook-ui-gateway.yaml | 14 ++++++++++++++ guestbook/guestbook-ui-virtualsvc.yaml | 19 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 guestbook/guestbook-ui-gateway.yaml create mode 100644 guestbook/guestbook-ui-virtualsvc.yaml diff --git a/guestbook/guestbook-ui-gateway.yaml b/guestbook/guestbook-ui-gateway.yaml new file mode 100644 index 0000000..63811b7 --- /dev/null +++ b/guestbook/guestbook-ui-gateway.yaml @@ -0,0 +1,14 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: Gateway +metadata: + name: guestbook +spec: + selector: + app: istio-ingressgateway + servers: + - port: + number: 80 + name: http + protocol: HTTP + hosts: + - "*" diff --git a/guestbook/guestbook-ui-virtualsvc.yaml b/guestbook/guestbook-ui-virtualsvc.yaml new file mode 100644 index 0000000..8c18886 --- /dev/null +++ b/guestbook/guestbook-ui-virtualsvc.yaml @@ -0,0 +1,19 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + name: guestbook-ui +spec: + hosts: + - guestbook-ui + http: + - match: + - uri: + prefix: "/" + route: + - destination: + host: guestbook-ui + subset: v2 + - route: + - destination: + host: guestbook-ui + subset: v1