Skip to content

Commit

Permalink
feat: add support for startupProbe on kong pods (#792)
Browse files Browse the repository at this point in the history
When Kong dataplanes need to load a large config, pods may take some time to be 
ready. Without the startup probe, we would need to increase failureThreshold or
play with initialDelaySeconds, which would have a negative side effect on
the responsiveness of these probes in case of real issues.
  • Loading branch information
slavogiez authored May 15, 2023
1 parent c378aa9 commit a3d2c0d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charts/kong/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

### Improvements

* Added support for `startupProbe` on Kong pods. This can be configured via
`.Values.startupProbe`. To maintain backward compatibility, it is disabled by default.
[#792](https:/Kong/charts/pull/792)
* Customize Admission Webhook namespaceSelectors and compose them from values.
[#794](https:/Kong/charts/pull/794)

Expand Down
1 change: 1 addition & 0 deletions charts/kong/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,7 @@ On the Gateway release side, set either `admin.tls.client.secretName` to the nam
| updateStrategy | update strategy for deployment | `{}` |
| readinessProbe | Kong readiness probe | |
| livenessProbe | Kong liveness probe | |
| startupProbe | Kong startup probe | |
| lifecycle | Proxy container lifecycle hooks | see `values.yaml` |
| terminationGracePeriodSeconds | Sets the [termination grace period](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#hook-handler-execution) for Deployment pods | 30 |
| affinity | Node/pod affinities | |
Expand Down
4 changes: 4 additions & 0 deletions charts/kong/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ spec:
{{ toYaml .Values.readinessProbe | indent 10 }}
livenessProbe:
{{ toYaml .Values.livenessProbe | indent 10 }}
{{- if .Values.startupProbe }}
startupProbe:
{{ toYaml .Values.startupProbe | indent 10 }}
{{- end }}
resources:
{{ toYaml .Values.resources | indent 10 }}
{{- end }} {{/* End of Kong container spec */}}
Expand Down
12 changes: 12 additions & 0 deletions charts/kong/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,18 @@ livenessProbe:
successThreshold: 1
failureThreshold: 3

# startupProbe for Kong pods
# startupProbe:
# httpGet:
# path: "/status"
# port: status
# scheme: HTTP
# initialDelaySeconds: 5
# timeoutSeconds: 5
# periodSeconds: 2
# successThreshold: 1
# failureThreshold: 40

# Proxy container lifecycle hooks
# Ref: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/
lifecycle:
Expand Down

0 comments on commit a3d2c0d

Please sign in to comment.