2018-06-26 18:01:24 +00:00
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: cartservice
|
|
|
|
spec:
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: cartservice
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: server
|
|
|
|
image: cartservice
|
|
|
|
ports:
|
|
|
|
- containerPort: 7070
|
|
|
|
env:
|
|
|
|
- name: REDIS_ADDR
|
|
|
|
value: "redis-cart:6379"
|
2018-06-28 05:49:12 +00:00
|
|
|
- name: PORT
|
2018-06-26 18:01:24 +00:00
|
|
|
value: "7070"
|
2018-06-28 05:49:12 +00:00
|
|
|
- name: LISTEN_ADDR
|
2018-06-28 05:31:31 +00:00
|
|
|
value: "0.0.0.0"
|
2018-06-26 18:01:24 +00:00
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: 200m
|
|
|
|
memory: 64Mi
|
|
|
|
limits:
|
|
|
|
cpu: 300m
|
|
|
|
memory: 128Mi
|
2018-06-29 00:55:51 +00:00
|
|
|
readinessProbe:
|
|
|
|
tcpSocket:
|
|
|
|
port: 7070
|
|
|
|
livenessProbe:
|
|
|
|
tcpSocket:
|
|
|
|
port: 7070
|
2018-06-26 18:01:24 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: cartservice
|
|
|
|
spec:
|
|
|
|
type: ClusterIP
|
|
|
|
selector:
|
|
|
|
app: cartservice
|
|
|
|
ports:
|
|
|
|
- port: 7070
|
|
|
|
targetPort: 7070
|