Skip to content

Commit

Permalink
feat(hedgedoc): customize liveness and readiness probes (#1320)
Browse files Browse the repository at this point in the history
  • Loading branch information
jon4hz authored Sep 16, 2024
1 parent 78098fa commit 28a30f7
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 11 deletions.
4 changes: 3 additions & 1 deletion charts/hedgedoc/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v2
name: hedgedoc
description: Chart for HedgeDoc, a fork of CodiMD
type: application
version: 0.5.1
version: 0.5.2
appVersion: "1.10.0"
icon: https://raw.githubusercontent.com/hedgedoc/hedgedoc-logo/main/LOGOTYPE/PNG/HedgeDoc-Logo%201.png
sources:
Expand All @@ -24,3 +24,5 @@ annotations:
artifacthub.io/changes: |
- kind: changed
description: Bumped hedgedoc image tag to 1.10.0
- kind: added
description: Option to customize liveness and readiness probe
9 changes: 8 additions & 1 deletion charts/hedgedoc/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 14 additions & 9 deletions charts/hedgedoc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,23 +79,28 @@ spec:
subPath: {{ .subPath }}
readOnly: {{ .readOnly }}
{{- end }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /_health
port: http
initialDelaySeconds: 20
failureThreshold: 2
successThreshold: 1
timeoutSeconds: 2
periodSeconds: 5
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
{{- end }}
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /status
port: http
initialDelaySeconds: 20
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 2
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
17 changes: 17 additions & 0 deletions charts/hedgedoc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,23 @@ securityContext: {}
# runAsNonRoot: true
# runAsUser: 1000

# -- Specify custom options for the containers liveness and readiness probes
livenessProbe:
enabled: true
initialDelaySeconds: 20
periodSeconds: 5
timeoutSeconds: 2
successThreshold: 1
failureThreshold: 2

readinessProbe:
enabled: true
initialDelaySeconds: 20
periodSeconds: 5
timeoutSeconds: 2
successThreshold: 1
failureThreshold: 2

# -- Ingress configuration
ingress:
enabled: false
Expand Down

0 comments on commit 28a30f7

Please sign in to comment.