From 9f9bcce5bb4e29a70621bfdc7c44613adc9c0553 Mon Sep 17 00:00:00 2001 From: Michael Haswell Date: Fri, 12 Jul 2024 10:03:10 -0700 Subject: [PATCH] Removed health probes, causing crashlooping Changed app to log to stdout and file Mounted shared local logs and log PVC --- helm/templates/deployment-app.yaml | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/helm/templates/deployment-app.yaml b/helm/templates/deployment-app.yaml index 028521a8c..f6621d246 100644 --- a/helm/templates/deployment-app.yaml +++ b/helm/templates/deployment-app.yaml @@ -69,6 +69,7 @@ spec: key: redis-password image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + command: ["2>&1 > /var/log/app.log"] ports: - name: web containerPort: 3000 @@ -102,6 +103,8 @@ spec: mountPath: {{ .mountPath }} subPath: {{ .subPath }} {{- end }} + - name: local-logs + mountPath: /var/log/ {{- if .Values.fluentbit.enabled }} - name: {{ .Chart.Name }}-fluent-bit image: {{ .Values.fluentbit.imageRegistry }} @@ -110,24 +113,6 @@ spec: - name: logs containerPort: 2020 protocol: TCP - livenessProbe: - httpGet: - path: / - port: logs - initialDelaySeconds: 10 - timeoutSeconds: 1 - periodSeconds: 60 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - httpGet: - path: / - port: logs - initialDelaySeconds: 10 - timeoutSeconds: 1 - periodSeconds: 60 - successThreshold: 1 - failureThreshold: 3 {{- if .Values.fluentbit.securityContext.enabled }} securityContext: {{- omit .Values.fluentbit.securityContext "enabled" | toYaml | nindent 12 }} {{- end }} @@ -136,15 +121,21 @@ spec: {{- end }} volumeMounts: - name: log-storage - mountPath: /tmp/ + mountPath: /tmp/pvc/ + - name: local-logs + mountPath: /tmp/logs/ {{- end }} volumes: - configMap: name: {{include "NotifyBC.fullname" .}} name: config-volume + - name: local-logs + emptyDir: {} + {{- if .Values.fluentbit.enabled }} - name: log-storage persistentVolumeClaim: claimName: {{ include "NotifyBC.fullname" . }}-logs + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }}