Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hostPath volume to save pod logs #327

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading