apiVersion: apps/v1
|
kind: Deployment
|
metadata:
|
name: notification-service
|
spec:
|
selector:
|
matchLabels:
|
app: notification-service
|
replicas: 1
|
template:
|
metadata:
|
labels:
|
app: notification-service
|
annotations:
|
sidecar.istio.io/inject: "true"
|
spec:
|
containers:
|
- name: notification-service
|
image: quay.io/psolarvi/ossm-notification-service:1.0
|
imagePullPolicy: Always
|
ports:
|
- containerPort: 8080
|
---
|
apiVersion: v1
|
kind: Service
|
metadata:
|
labels:
|
app: notification-service
|
name: notification-service
|
spec:
|
ports:
|
- port: 8080
|
protocol: TCP
|
targetPort: 8080
|
selector:
|
app: notification-service
|
---
|
apiVersion: networking.istio.io/v1alpha3
|
kind: Gateway
|
metadata:
|
name: notification-service-gw
|
spec:
|
selector:
|
istio: ingressgateway
|
servers:
|
- port:
|
number: 80
|
name: http
|
protocol: HTTP
|
hosts:
|
- "*"
|
---
|
apiVersion: networking.istio.io/v1alpha3
|
kind: VirtualService
|
metadata:
|
name: notification-service-vs
|
spec:
|
hosts:
|
- "*"
|
gateways:
|
- notification-service-gw
|
http:
|
- match:
|
- uri:
|
prefix: /notifications
|
route:
|
- destination:
|
host: notification-service
|
port:
|
number: 8080
|