diff --git a/kubernetes/ams-k8s-deployment-edge.yaml b/kubernetes/ams-k8s-deployment-edge.yaml index 71b3d938..9a25b1ee 100644 --- a/kubernetes/ams-k8s-deployment-edge.yaml +++ b/kubernetes/ams-k8s-deployment-edge.yaml @@ -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: / @@ -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 diff --git a/kubernetes/ams-k8s-deployment-origin.yaml b/kubernetes/ams-k8s-deployment-origin.yaml index ec0982c9..b99e0a44 100644 --- a/kubernetes/ams-k8s-deployment-origin.yaml +++ b/kubernetes/ams-k8s-deployment-origin.yaml @@ -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: / @@ -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