Skip to content

Commit

Permalink
chore: added Liveliness and Readiness Probes to K8S deployment (async…
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijeetjejurkar authored Mar 18, 2022
1 parent 35d65f0 commit ce5f11b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
13 changes: 13 additions & 0 deletions deployments/k8s/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ spec:
- name: http
containerPort: {{ .Values.ports.http }}
protocol: TCP
livenessProbe:
httpGet:
path: /
port: {{ .Values.ports.http }}
initialDelaySeconds: {{ .Values.initialDelaySeconds.liveness }}
periodSeconds: {{ .Values.periodSeconds.liveness }}
readinessProbe:
httpGet:
path: /
port: {{ .Values.ports.http }}
initialDelaySeconds: {{ .Values.initialDelaySeconds.readiness }}
periodSeconds: {{ .Values.periodSeconds.readiness }}

resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
8 changes: 8 additions & 0 deletions deployments/k8s/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ ports:
# Port where the Server API will be available.
http: 80

#periodSeconds for livenees and Readiness Ports
periodSeconds:
liveness: 10
readiness: 6
#initialDelaySeconds for liveness and Readiness Ports
initialDelaySeconds:
liveness: 30
readiness: 30
# Env vars. Needed for configuring the app.
env: {}

Expand Down

0 comments on commit ce5f11b

Please sign in to comment.