Feature/export pod logs (#37)
* 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
This commit is contained in:
parent
edc1a4f50c
commit
0dd1e1e88e
@ -21,7 +21,10 @@ spec:
|
|||||||
- name: osrm-backend
|
- name: osrm-backend
|
||||||
image: TELENAV_OSRM_BACKEND_DOCKER_IMAGE
|
image: TELENAV_OSRM_BACKEND_DOCKER_IMAGE
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
args: ["routed_startup"]
|
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:
|
ports:
|
||||||
- containerPort: 5000
|
- containerPort: 5000
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
@ -31,3 +34,8 @@ spec:
|
|||||||
initialDelaySeconds: 10
|
initialDelaySeconds: 10
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
failureThreshold: 1000
|
failureThreshold: 1000
|
||||||
|
volumes:
|
||||||
|
- name: osrm-logs-volume
|
||||||
|
nfs:
|
||||||
|
server: fs-3941ca92.efs.us-west-2.amazonaws.com
|
||||||
|
path: /
|
||||||
|
|||||||
@ -41,7 +41,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
|
|||||||
libboost-iostreams1.62.0 libboost-thread1.62.0 expat liblua5.2-0 libtbb2 curl ca-certificates && \
|
libboost-iostreams1.62.0 libboost-thread1.62.0 expat liblua5.2-0 libtbb2 curl ca-certificates && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN mkdir /osrm-build && mkdir /osrm-data
|
RUN mkdir -p /osrm-build /osrm-data /osrm-logs
|
||||||
|
|
||||||
COPY --from=builder /osrm-build /osrm-build/
|
COPY --from=builder /osrm-build /osrm-build/
|
||||||
COPY --from=gobuilder /workspace/go/bin /osrm-build/
|
COPY --from=gobuilder /workspace/go/bin /osrm-build/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user