Skip to content

Commit

Permalink
add ability to set container lifecycle hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
drpebcak committed Oct 9, 2020
1 parent c00b061 commit 27b276c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ spec:
{{- toYaml .Values.readinessProbe | nindent 12 }}
startupProbe:
{{- toYaml .Values.startupProbe | nindent 12 }}
{{- with .Values.lifecycle }}
lifecycle:
{{- toYaml . | nindent 12 }}
{{- end }}
env:
- name: DATABASE_USERNAME
value: {{ .Values.database.user }}
Expand Down
15 changes: 14 additions & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,16 @@ kickstart:
# setup-password.txt: |
# Hallo

lifecycle: {}
# # lifecycle.postStart -- postStart lifecycle command for fusionauth container
# postStart:
# exec:
# command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"]
# # lifecycle.preStop -- preStop lifecycle command for fusionauth container
# preStop:
# exec:
# command: ["/bin/bash","-c","kill -3 1"]

podDisruptionBudget:
# podDisruptionBudget.enabled -- Enables creation of a PodDisruptionBudget
enabled: false
Expand Down Expand Up @@ -193,16 +203,19 @@ livenessProbe:
port: http
failureThreshold: 3
periodSeconds: 30
timeoutSeconds: 5
# readinessProbe -- Configures a readinessProbe to ensure fusionauth is ready for requests
readinessProbe:
httpGet:
path: /api/status
port: http
failureThreshold: 3
timeoutSeconds: 5
# startupProbe -- Configures a startupProbe to ensure fusionauth has finished starting up
startupProbe:
httpGet:
path: /api/status
port: http
failureThreshold: 20
periodSeconds: 10
periodSeconds: 10
timeoutSeconds: 5

0 comments on commit 27b276c

Please sign in to comment.