Skip to content

Commit

Permalink
Removed health probes, causing crashlooping
Browse files Browse the repository at this point in the history
Changed app to log to stdout and file
Mounted shared local logs and log PVC
  • Loading branch information
mhaswell-bcgov committed Jul 12, 2024
1 parent c7c53b1 commit 9f9bcce
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions helm/templates/deployment-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand Down

0 comments on commit 9f9bcce

Please sign in to comment.