Skip to content

Commit 80841c5

Browse files
authored
feat: export status endpoint in service for alb health check (#212)
Signed-off-by: Nic <[email protected]>
1 parent cdae0a8 commit 80841c5

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed

charts/gateway/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type: application
1414
# This is the chart version. This version number should be incremented each time you make changes
1515
# to the chart and its templates, including the app version.
1616
# Versions are expected to follow Semantic Versioning (https://semver.org/)
17-
version: 0.2.28
17+
version: 0.2.29
1818

1919
# This is the version number of the application being deployed. This version number should be
2020
# incremented each time you make changes to the application. Versions are not expected to

charts/gateway/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The command removes all the Kubernetes components associated with the chart and
5353
| api7ee.disable_upstream_healthcheck | bool | `false` | A global switch for healthcheck. Defaults to false. When set to true, it overrides all upstream healthcheck configurations and globally disabling healthchecks. |
5454
| api7ee.healthcheck_report_interval | int | `120` | healthcheck data report interval in seconds |
5555
| api7ee.status_endpoint.enabled | bool | `false` | When enabled, APISIX will provide `/status` and `/status/ready` endpoints, /status endpoint will return 200 status code if APISIX has successfully started and running correctly, /status/ready endpoint will return 503 status code if none of the configured etcd (dp_manager) are available. |
56-
| api7ee.status_endpoint.ip | string | `"127.0.0.1"` | The IP address and port on which the status endpoint will listen. |
56+
| api7ee.status_endpoint.ip | string | `"0.0.0.0"` | The IP address and port on which the status endpoint will listen. |
5757
| api7ee.status_endpoint.port | int | `7085` | The port on which the status endpoint will listen. |
5858
| api7ee.telemetry.enable | bool | `true` | enable telemetry data report to the control plane |
5959
| api7ee.telemetry.interval | int | `15` | interval in seconds to send telemetry data to the control plane |

charts/gateway/templates/_pod.tpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ spec:
9595
containerPort: {{ .Values.serviceMonitor.containerPort }}
9696
protocol: TCP
9797
{{- end }}
98+
{{- if .Values.api7ee.status_endpoint.enabled }}
99+
- name: status
100+
containerPort: {{ .Values.api7ee.status_endpoint.port }}
101+
protocol: TCP
102+
{{- end }}
98103
{{- if and .Values.gateway.stream.enabled (or (gt (len .Values.gateway.stream.tcp) 0) (gt (len .Values.gateway.stream.udp) 0)) }}
99104
{{- with .Values.gateway.stream }}
100105
{{- if (gt (len .tcp) 0) }}

charts/gateway/templates/service-gateway.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ spec:
7272
targetPort: {{ .Values.serviceMonitor.containerPort }}
7373
protocol: TCP
7474
{{- end }}
75+
{{- if .Values.api7ee.status_endpoint.enabled }}
76+
- name: status
77+
port: {{ .Values.api7ee.status_endpoint.port }}
78+
targetPort: status
79+
protocol: TCP
80+
{{- end }}
7581
{{- if and .Values.gateway.stream.enabled (or (gt (len .Values.gateway.stream.tcp) 0) (gt (len .Values.gateway.stream.udp) 0)) }}
7682
{{- with .Values.gateway.stream }}
7783
{{- if (gt (len .tcp) 0) }}

charts/gateway/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ api7ee:
2121
# -- When enabled, APISIX will provide `/status` and `/status/ready` endpoints, /status endpoint will return 200 status code if APISIX has successfully started and running correctly, /status/ready endpoint will return 503 status code if none of the configured etcd (dp_manager) are available.
2222
enabled: false
2323
# -- The IP address and port on which the status endpoint will listen.
24-
ip: 127.0.0.1
24+
ip: 0.0.0.0
2525
# -- The port on which the status endpoint will listen.
2626
port: 7085
2727

0 commit comments

Comments
 (0)