Skip to content

Commit

Permalink
+ startupProbe
Browse files Browse the repository at this point in the history
  • Loading branch information
joy2fun committed Jan 2, 2024
1 parent b741bca commit 5b456cb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.4
version: 0.1.5

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.1.4"
appVersion: "0.1.5"
2 changes: 2 additions & 0 deletions app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ spec:
{{- toYaml .Values.resources | nindent 12 }}
lifecycle:
{{- toYaml .Values.lifecycle | nindent 12 }}
startupProbe:
{{- toYaml .Values.startupProbe | nindent 12 }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
Expand Down
16 changes: 11 additions & 5 deletions app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ image:
repository: nginx
pullPolicy: Always
# IfNotPresent
tag: "alpine"
tag: alpine

imagePullSecrets: []
nameOverride: ""
Expand Down Expand Up @@ -89,14 +89,20 @@ job:
# - artisan
# - schedule:run

lifecycle:
preStop:
exec:
command: ["sh", "-c", "sleep 5"]
lifecycle: {}
# preStop:
# exec:
# command: ["sh", "-c", "sleep 5"]
# postStart:
# exec:
# command: ["sh", "-c", "chown -R www-data:www-data /app/storage"]

startupProbe:
exec:
command: ["ls", "/tmp"]
initialDelaySeconds: 5
periodSeconds: 5

resources: {}

autoscaling:
Expand Down

0 comments on commit 5b456cb

Please sign in to comment.