* chore: write out running logs for monitoring * chore: change default traffix proxy ip * chore: add timestamp for each log line * chore: use AWS EFS instead of AWS EBS to support ReadWriteMany * chore: create /osrm-logs folder by default
42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: osrm
|
|
namespace: routing-osrm
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxSurge: 1
|
|
maxUnavailable: 0
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: routing
|
|
spec:
|
|
nodeSelector:
|
|
routing-osrm/role: routing-osrm
|
|
containers:
|
|
- name: osrm-backend
|
|
image: TELENAV_OSRM_BACKEND_DOCKER_IMAGE
|
|
imagePullPolicy: IfNotPresent
|
|
command: ["/bin/sh", "-c", "export LOG_FILE=/osrm-logs/$(date -u +%Y%m%dT%H%M%S)-${HOSTNAME}.log; /docker-entrypoint.sh routed_startup 10.189.100.132 2>&1 | while read LINE; do echo \"[$(date \"+%Y-%m-%dT%H:%M:%S %Z\")] ${LINE}\">>${LOG_FILE}; done;"]
|
|
volumeMounts:
|
|
- mountPath: "/osrm-logs"
|
|
name: osrm-logs-volume
|
|
ports:
|
|
- containerPort: 5000
|
|
protocol: TCP
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 5000
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 5
|
|
failureThreshold: 1000
|
|
volumes:
|
|
- name: osrm-logs-volume
|
|
nfs:
|
|
server: fs-3941ca92.efs.us-west-2.amazonaws.com
|
|
path: /
|