Skip to content

Commit

Permalink
Merge pull request #414 from bcgov/yj
Browse files Browse the repository at this point in the history
chore: logs
  • Loading branch information
ychung-mot authored Jun 19, 2024
2 parents e7e50b2 + df9e450 commit ddaf338
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 64 deletions.
11 changes: 11 additions & 0 deletions helm/_backend/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ spec:
periodSeconds: 10
successThreshold: 1
failureThreshold: 5
volumeMounts:
- name: logs
mountPath: /strdss/logs
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand All @@ -114,4 +117,12 @@ spec:
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: logs
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "app.fullname" . }}-log
{{- else }}
emptyDir: {}
{{- end }}
14 changes: 14 additions & 0 deletions helm/_backend/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.persistence.enabled }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "app.fullname" . }}-log
labels:
{{- include "app.labels" . | nindent 4 }}
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: {{ .Values.persistence.pvcSize }}
{{- end }}
6 changes: 5 additions & 1 deletion helm/_backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,8 @@ nodeSelector: {}

tolerations: []

affinity: {}
affinity: {}

persistence:
enabled: true
pvcSize: 256Mi
11 changes: 11 additions & 0 deletions helm/_hangfire/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ spec:
periodSeconds: 10
successThreshold: 1
failureThreshold: 5
volumeMounts:
- name: logs
mountPath: /strdss/logs
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand All @@ -114,4 +117,12 @@ spec:
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: logs
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "app.fullname" . }}-log
{{- else }}
emptyDir: {}
{{- end }}
14 changes: 14 additions & 0 deletions helm/_hangfire/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.persistence.enabled }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "app.fullname" . }}-log
labels:
{{- include "app.labels" . | nindent 4 }}
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: {{ .Values.persistence.pvcSize }}
{{- end }}
6 changes: 5 additions & 1 deletion helm/_hangfire/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,8 @@ nodeSelector: {}

tolerations: []

affinity: {}
affinity: {}

persistence:
enabled: true
pvcSize: 256Mi
30 changes: 0 additions & 30 deletions server/StrDss.Api/appsettings.Development.json

This file was deleted.

2 changes: 1 addition & 1 deletion server/StrDss.Api/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{
"Name": "File",
"Args": {
"path": "logs/app-.log",
"path": "/strdss/logs/app-.log",
"rollingInterval": "Day",
"fileSizeLimitBytes": 10485760,
"rollOnFileSizeLimit": true,
Expand Down
30 changes: 0 additions & 30 deletions server/StrDss.Hangfire/appsettings.Development.json

This file was deleted.

2 changes: 1 addition & 1 deletion server/StrDss.Hangfire/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{
"Name": "File",
"Args": {
"path": "logs/hangfire-.log",
"path": "/strdss/logs/app-.log",
"rollingInterval": "Day",
"fileSizeLimitBytes": 10485760,
"rollOnFileSizeLimit": true,
Expand Down

0 comments on commit ddaf338

Please sign in to comment.