Skip to content

Commit

Permalink
Add readinessProbe
Browse files Browse the repository at this point in the history
  • Loading branch information
jbeemster committed Jul 25, 2022
1 parent 5edb97b commit 0e70349
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
13 changes: 13 additions & 0 deletions charts/service-deployment/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@ spec:
resources:
{{- toYaml .Values.resources | nindent 10 }}

{{- if ne .Values.readinessProbe.httpGet.path "" }}
readinessProbe:
httpGet:
path: {{ .Values.readinessProbe.httpGet.path }}
port: {{ .Values.service.port }}
scheme: HTTP
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
{{- end }}

{{- if .Values.configMaps }}
volumeMounts:
{{- range $v := .Values.configMaps }}
Expand Down
15 changes: 13 additions & 2 deletions charts/service-deployment/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,23 @@ resources: {}
# cpu: 400m
# memory: 512Mi

# -- Details of the readinessProbe that will send HTTP request on the service.port
readinessProbe:
httpGet:
# -- Path for health checks to be performed (note: set to "" to disable)
path: "/"
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 5
failureThreshold: 3
successThreshold: 2

# -- Grace period for termination of the service
terminationGracePeriodSeconds: 60

hpa:
# -- Whether to deploy HPA rules
deploy: false
deploy: true
# -- Minimum number of pods to deploy
minReplicas: 1
# -- Maximum number of pods to deploy
Expand All @@ -55,7 +66,7 @@ hpa:

service:
# -- Whether to setup service bindings (note: only NodePort is supported)
deploy: false
deploy: true
# -- Port to bind and expose the service on
port: 80
aws:
Expand Down

0 comments on commit 0e70349

Please sign in to comment.