Created
January 28, 2020 01:03
-
-
Save edwardcallahan/5038460c02644f0814b4e888775da208 to your computer and use it in GitHub Desktop.
InMemory StatefulService and VirtualService
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: cloudstate.io/v1alpha1 | |
kind: StatefulStore | |
metadata: | |
namespace: shopping-cart | |
name: inmemory-sstore | |
spec: | |
type: InMemory | |
--- | |
apiVersion: cloudstate.io/v1alpha1 | |
kind: StatefulService | |
metadata: | |
name: cart-ssvc | |
namespace: shopping-cart | |
labels: | |
app: shopping-cart | |
spec: | |
datastore: | |
name: inmemory-sstore | |
containers: | |
- image: calncal/js-shopping-cart:latest | |
--- | |
# HTTP routes will be applied to platform service ports named ‘http-’/‘http2-’/‘grpc-*’, gateway ports with protocol HTTP/HTTP2/GRPC/ TLS-terminated-HTTPS and service entry ports using HTTP/HTTP2/GRPC protocols. https://istio.io/docs/reference/config/networking/virtual-service/ | |
apiVersion: networking.istio.io/v1alpha3 | |
kind: Gateway | |
metadata: | |
name: grpc-cart-gateway | |
namespace: shopping-cart | |
spec: | |
selector: | |
istio: ingressgateway | |
servers: | |
- port: | |
number: 80 | |
name: GRPC | |
protocol: GRPC | |
hosts: | |
- "shopping.cloudstate.io" | |
--- | |
apiVersion: networking.istio.io/v1alpha3 | |
kind: VirtualService | |
metadata: | |
name: cart-vs | |
namespace: shopping-cart | |
spec: | |
hosts: | |
- "shopping.cloudstate.io" | |
gateways: | |
- grpc-cart-gateway | |
http: | |
- match: | |
- uri: | |
prefix: /cart | |
- uri: | |
prefix: /carts | |
route: | |
- destination: | |
host: cart-ssvc | |
port: | |
number: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment