This is an automated email from the ASF dual-hosted git repository.
gallardot pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-helm-chart.git
The following commit(s) were added to refs/heads/master by this push:
new 0c7d61b feat: Customize the readiness probe of APISIX pod (#545)
(#548)
0c7d61b is described below
commit 0c7d61b897f0c54ca42b1e62f107ae8a46f2f874
Author: Junyeong Jang <[email protected]>
AuthorDate: Sun Jun 18 19:04:48 2023 +0900
feat: Customize the readiness probe of APISIX pod (#545) (#548)
* feat: support readinessProbe for apisix pod (#545)
* docs: update README.md (#545)
---------
Co-authored-by: 장준영(Junyeong Jang)/Core플랫폼개발팀/11ST
<[email protected]>
---
charts/apisix/README.md | 1 +
charts/apisix/templates/_pod.tpl | 8 +-------
charts/apisix/values.yaml | 12 +++++++++++-
3 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/charts/apisix/README.md b/charts/apisix/README.md
index eb9c68c..78dedd5 100644
--- a/charts/apisix/README.md
+++ b/charts/apisix/README.md
@@ -85,6 +85,7 @@ The command removes all the Kubernetes components associated
with the chart and
| apisix.podDisruptionBudget.minAvailable | string | `"90%"` | Set the
`minAvailable` of podDisruptionBudget. You can specify only one of
`maxUnavailable` and `minAvailable` in a single PodDisruptionBudget. See
[Specifying a Disruption Budget for your
Application](https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget)
for more details |
| apisix.podSecurityContext | object | `{}` | Set the securityContext for
Apache APISIX pods |
| apisix.priorityClassName | string | `""` | Set
[priorityClassName](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#pod-priority)
for Apache APISIX pods |
+| apisix.readinessProbe | object |
`{"failureThreshold":6,"initialDelaySeconds":10,"periodSeconds":10,"successThreshold":1,"tcpSocket":{"port":9080},"timeoutSeconds":1}`
| Set the readinessProbe for Apache APISIX pods |
| apisix.replicaCount | int | `1` | kind is DaemonSet, replicaCount not become
effective |
| apisix.resources | object | `{}` | Set pod resource requests & limits |
| apisix.securityContext | object | `{}` | Set the securityContext for Apache
APISIX container |
diff --git a/charts/apisix/templates/_pod.tpl b/charts/apisix/templates/_pod.tpl
index d2860a9..535a0dc 100644
--- a/charts/apisix/templates/_pod.tpl
+++ b/charts/apisix/templates/_pod.tpl
@@ -106,13 +106,7 @@ spec:
{{- if ne .Values.deployment.role "control_plane" }}
readinessProbe:
- failureThreshold: 6
- initialDelaySeconds: 10
- periodSeconds: 10
- successThreshold: 1
- tcpSocket:
- port: {{ .Values.gateway.http.containerPort }}
- timeoutSeconds: 1
+ {{- toYaml .Values.apisix.readinessProbe | nindent 8 }}
{{- end }}
lifecycle:
preStop:
diff --git a/charts/apisix/values.yaml b/charts/apisix/values.yaml
index 805d52f..272d358 100644
--- a/charts/apisix/values.yaml
+++ b/charts/apisix/values.yaml
@@ -157,6 +157,16 @@ apisix:
# key: KEY
extraEnvVars: []
+ # -- Set the readinessProbe for Apache APISIX pods
+ readinessProbe:
+ failureThreshold: 6
+ initialDelaySeconds: 10
+ periodSeconds: 10
+ successThreshold: 1
+ tcpSocket:
+ port: &gatewayHttpContainerPort 9080
+ timeoutSeconds: 1
+
nameOverride: ""
fullnameOverride: ""
@@ -232,7 +242,7 @@ gateway:
http:
enabled: true
servicePort: 80
- containerPort: 9080
+ containerPort: *gatewayHttpContainerPort
# -- Support multiple http ports, See
[Configuration](https://github.com/apache/apisix/blob/0bc65ea9acd726f79f80ae0abd8f50b7eb172e3d/conf/config-default.yaml#L24)
additionalContainerPorts: []
# - port: 9081