2022-09-08 13:39:12 -07:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: server
|
|
|
|
labels:
|
|
|
|
app: server
|
|
|
|
spec:
|
|
|
|
clusterIP: None
|
|
|
|
selector:
|
|
|
|
app: server
|
|
|
|
ports:
|
2022-09-11 13:57:01 -07:00
|
|
|
- port: 4000
|
2022-09-08 13:39:12 -07:00
|
|
|
name: server
|
|
|
|
protocol: TCP
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: StatefulSet
|
|
|
|
metadata:
|
|
|
|
name: server
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: server
|
|
|
|
serviceName: server
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: server
|
|
|
|
spec:
|
|
|
|
restartPolicy: Always
|
|
|
|
terminationGracePeriodSeconds: 0
|
|
|
|
containers:
|
|
|
|
- name: server
|
|
|
|
image: server:latest
|
|
|
|
env:
|
|
|
|
- name: MONGODB_URI
|
2022-12-15 07:51:15 -08:00
|
|
|
value: mongodb://mongo-0.mongo/?replicaSet=rs0
|
2022-09-08 13:39:12 -07:00
|
|
|
readinessProbe:
|
|
|
|
tcpSocket:
|
2022-09-11 13:57:01 -07:00
|
|
|
port: 4000
|
2022-09-08 13:39:12 -07:00
|
|
|
periodSeconds: 1
|
|
|
|
failureThreshold: 300
|
|
|
|
ports:
|
2022-09-11 13:57:01 -07:00
|
|
|
- containerPort: 4000
|
2022-09-08 13:39:12 -07:00
|
|
|
name: server
|
|
|
|
protocol: TCP
|