From 67d26d4c59e36d6e53dcaab90e1da9730045e3df Mon Sep 17 00:00:00 2001 From: 0x6b-dev Date: Mon, 10 Jul 2023 00:10:55 +1000 Subject: [PATCH] added liveliness probe, readiness probe and startup probe --- .../stable/homebox/templates/deployment.yaml | 12 +++++++ charts/stable/homebox/values.yaml | 30 +++++++++++++++++ .../stable/kavita/templates/deployment.yaml | 12 +++++++ charts/stable/kavita/values.yaml | 32 ++++++++++++++++++- charts/stable/romm/templates/deployment.yaml | 12 +++++++ 5 files changed, 97 insertions(+), 1 deletion(-) diff --git a/charts/stable/homebox/templates/deployment.yaml b/charts/stable/homebox/templates/deployment.yaml index c94fad1..3b0c1e2 100644 --- a/charts/stable/homebox/templates/deployment.yaml +++ b/charts/stable/homebox/templates/deployment.yaml @@ -38,6 +38,18 @@ spec: - name: http containerPort: 7745 protocol: TCP + {{- if .Values.livenessProbe.enabled }} + livenessProbe: + {{- toYaml (omit .Values.livenessProbe "enabled") | nindent 12 }} + {{- end }} + {{- if .Values.readinessProbe.enabled }} + readinessProbe: + {{- toYaml (omit .Values.readinessProbe "enabled") | nindent 12 }} + {{- end }} + {{- if .Values.startupProbe.enabled }} + startupProbe: + {{- toYaml (omit .Values.startupProbe "enabled") | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/stable/homebox/values.yaml b/charts/stable/homebox/values.yaml index 339c4a7..4812d2d 100644 --- a/charts/stable/homebox/values.yaml +++ b/charts/stable/homebox/values.yaml @@ -64,3 +64,33 @@ persistence: extraVolumes: [] extraContainerVolumeMounts: [] + +livenessProbe: + enabled: true + tcpSocket: + port: http + initialDelaySeconds: 200 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 10 + +readinessProbe: + enabled: true + tcpSocket: + port: http + initialDelaySeconds: 5 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + +startupProbe: + enabled: false + tcpSocket: + port: http + initialDelaySeconds: 60 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 10 \ No newline at end of file diff --git a/charts/stable/kavita/templates/deployment.yaml b/charts/stable/kavita/templates/deployment.yaml index ae456fb..6eeff95 100644 --- a/charts/stable/kavita/templates/deployment.yaml +++ b/charts/stable/kavita/templates/deployment.yaml @@ -38,6 +38,18 @@ spec: - name: http containerPort: 7745 protocol: TCP + {{- if .Values.livenessProbe.enabled }} + livenessProbe: + {{- toYaml (omit .Values.livenessProbe "enabled") | nindent 12 }} + {{- end }} + {{- if .Values.readinessProbe.enabled }} + readinessProbe: + {{- toYaml (omit .Values.readinessProbe "enabled") | nindent 12 }} + {{- end }} + {{- if .Values.startupProbe.enabled }} + startupProbe: + {{- toYaml (omit .Values.startupProbe "enabled") | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/stable/kavita/values.yaml b/charts/stable/kavita/values.yaml index b8b44b7..f18a0c0 100644 --- a/charts/stable/kavita/values.yaml +++ b/charts/stable/kavita/values.yaml @@ -54,4 +54,34 @@ extraVolumes: # readOnly: false extraVolumeMounts: # - name: nfs -# mountPath: "/legacy_data" \ No newline at end of file +# mountPath: "/legacy_data" + +livenessProbe: + enabled: true + tcpSocket: + port: http + initialDelaySeconds: 200 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 10 + +readinessProbe: + enabled: true + tcpSocket: + port: http + initialDelaySeconds: 5 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + +startupProbe: + enabled: false + tcpSocket: + port: http + initialDelaySeconds: 60 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 10 \ No newline at end of file diff --git a/charts/stable/romm/templates/deployment.yaml b/charts/stable/romm/templates/deployment.yaml index dd80cb6..09527c0 100644 --- a/charts/stable/romm/templates/deployment.yaml +++ b/charts/stable/romm/templates/deployment.yaml @@ -65,6 +65,18 @@ spec: - name: http containerPort: 80 protocol: TCP + {{- if .Values.livenessProbe.enabled }} + livenessProbe: + {{- toYaml (omit .Values.livenessProbe "enabled") | nindent 12 }} + {{- end }} + {{- if .Values.readinessProbe.enabled }} + readinessProbe: + {{- toYaml (omit .Values.readinessProbe "enabled") | nindent 12 }} + {{- end }} + {{- if .Values.startupProbe.enabled }} + startupProbe: + {{- toYaml (omit .Values.startupProbe "enabled") | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: