Skip to content

Commit

Permalink
Added a volume for Portalbackend logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kostas Filippopolitis committed Jul 24, 2024
1 parent 8042e59 commit de484ae
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
52 changes: 52 additions & 0 deletions kubernetes/templates/portalbackend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,53 @@ spec:
requests:
storage: {{ .Values.portalbackend.storage.storage0.data_size }}

---
apiVersion: v1
kind: PersistentVolume
metadata:
name: portalbackend-logs-vol0
namespace: {{ .Values.namespace }}
labels:
storage: portalbackend-logs-storage0
spec:
capacity:
storage: {{ .Values.portalbackend.logs.storage0.data_size }}
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Delete
storageClassName: k8s-local-storage
hostPath:
path: {{ .Values.portalbackend.logs.storage0.data_path }}
type: DirectoryOrCreate
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: master
operator: In
values:
- "true"

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: portalbackend-logs-claim0
namespace: {{ .Values.namespace }}
labels:
storage: portalbackend-logs-storage0
spec:
selector:
matchLabels:
storage: portalbackend-logs-storage0
storageClassName: k8s-local-storage
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.portalbackend.logs.storage0.data_size }}

---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -121,6 +168,9 @@ spec:
- name: portalbackend-claim0
persistentVolumeClaim:
claimName: portalbackend-claim0
- name: portalbackend-logs-claim0
persistentVolumeClaim:
claimName: portalbackend-logs-claim0
containers:
- name: portalbackend-db
image: {{ .Values.portalbackend_db.image.name }}:{{ .Values.portalbackend_db.image.version }}
Expand All @@ -147,6 +197,8 @@ spec:
volumeMounts:
- name: portalbackend-claim0
mountPath: /opt/portal/api
- name: portalbackend-logs-claim0
mountPath: /var/log/portalbackend
env:
- name: LOG_LEVEL
valueFrom:
Expand Down
6 changes: 5 additions & 1 deletion kubernetes/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,15 @@ portalbackend:
ALGORITHM_UPDATE_INTERVAL: 60 # seconds
image:
name: hbpmip/portal-backend
version: 8.0.4
version: 8.0.5
storage:
storage0:
data_path: /opt/mip-deployment/config
data_size: 100Mi
logs:
storage0:
data_path: /opt/mip-deployment/logs
data_size: 100Mi

gateway_db:
image:
Expand Down

0 comments on commit de484ae

Please sign in to comment.