Skip to content

Commit

Permalink
Add logging volume to K8s and docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Nacho committed Jan 31, 2024
1 parent 22a2324 commit 0c30682
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ volumes:
labels:
- "nuvlaedge.volume=True"
- "nuvlaedge.deployment=production"
nuvlaedge-logs:
driver: local
labels:
- "nuvlaedge.volume=True"
- "nuvlaedge.deployment=production"

services:
system-manager:
Expand All @@ -39,6 +44,7 @@ services:
volumes:
- ${DOCKER_SOCKET_PATH:-/var/run/docker.sock}:/var/run/docker.sock
- nuvlabox-db:/srv/nuvlaedge/shared
- nuvlaedge-logs:/var/log/nuvlaedge

agent:
<<: *common
Expand Down Expand Up @@ -83,6 +89,7 @@ services:
- ${DOCKER_SOCKET_PATH:-/var/run/docker.sock}:/var/run/docker.sock
- nuvlabox-db:/srv/nuvlaedge/shared
- /:/rootfs:ro
- nuvlaedge-logs:/var/log/nuvlaedge

compute-api:
<<: *common
Expand Down
5 changes: 5 additions & 0 deletions helm/templates/agent-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,18 @@ spec:
readOnly: true
- mountPath: /srv/nuvlaedge/shared
name: nuvlaedge-db
- mountPath: /var/log/nuvlaedge
name: nuvlaedge-logs


## VOLUMES
volumes:
- name: rootfs
hostPath:
path: /
- name: nuvlaedge-logs
hostPath:
path: {{ .Values.nuvlaedgeVolumeHostPath }}/{{ include "nuvlaedge.namespace" . }}/logs
- name: nuvlaedge-db
hostPath:
path: {{ .Values.nuvlaedgeVolumeHostPath }}/{{ include "nuvlaedge.namespace" . }}

0 comments on commit 0c30682

Please sign in to comment.