Skip to content

Commit

Permalink
Add hostPath volume to save pod logs
Browse files Browse the repository at this point in the history
  • Loading branch information
muratugureminoglu committed Dec 19, 2024
1 parent c71d8f2 commit 3ad1d14
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
13 changes: 13 additions & 0 deletions kubernetes/ams-k8s-deployment-edge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,18 @@ spec:
# You may also need to add -u and -p parameters for
# specifying mongodb username and passwords respectively
args: ["-g", "true", "-s", "true", "-r", "true", "-m", "cluster", "-h", "mongo"]
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
volumeMounts:
- mountPath: /tmp
name: temp-volume
- mountPath: /var/log/antmedia/
name: log-storage
subPath: ${POD_NAME}
livenessProbe:
httpGet:
path: /
Expand All @@ -68,6 +77,10 @@ spec:
path: /temp-data
type: DirectoryOrCreate
name: temp-volume
- hostPath:
path: /mnt/logs/antmedia
type: DirectoryOrCreate
name: log-storage

# imagePullSecrets:
# - name: docker
14 changes: 13 additions & 1 deletion kubernetes/ams-k8s-deployment-origin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,18 @@ spec:
# You may also need to add -u and -p parameters for
# specifying mongodb username and passwords respectively
args: ["-g", "true", "-s", "true", "-r", "true", "-m", "cluster", "-h", "mongo"]
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
volumeMounts:
- mountPath: /tmp
name: temp-volume
- mountPath: /var/log/antmedia/
name: log-storage
subPath: ${POD_NAME}
livenessProbe:
httpGet:
path: /
Expand All @@ -68,6 +77,9 @@ spec:
path: /temp-data
type: DirectoryOrCreate
name: temp-volume

- hostPath:
path: /mnt/logs/antmedia
type: DirectoryOrCreate
name: log-storage
# imagePullSecrets:
# - name: docker

0 comments on commit 3ad1d14

Please sign in to comment.