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

Added a volume for Portalbackend logs. #168

Merged
merged 5 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
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: Retain
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.6
storage:
storage0:
data_path: /opt/mip-deployment/config
data_size: 100Mi
logs:
storage0:
data_path: /opt/mip-deployment/logs
data_size: 1Gi

gateway_db:
image:
Expand Down
Loading