Skip to content

Commit 3ad03f2

Browse files
authored
feat: support configure listening ip address for gateway port (#204)
Signed-off-by: Nic <[email protected]>
1 parent 226a1be commit 3ad03f2

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
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.24
17+
version: 0.2.25
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: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,18 +172,20 @@ The command removes all the Kubernetes components associated with the chart and
172172
| fullnameOverride | string | `""` | |
173173
| gateway.externalIPs | list | `[]` | IPs for which nodes in the cluster will also accept traffic for the servic annotations: service.beta.kubernetes.io/aws-load-balancer-type: nlb |
174174
| gateway.externalTrafficPolicy | string | `"Cluster"` | |
175-
| gateway.http | object | `{"additionalContainerPorts":[],"containerPort":9080,"enabled":true,"servicePort":80}` | API7 Gateway service settings for http |
175+
| gateway.http | object | `{"additionalContainerPorts":[],"containerPort":9080,"enabled":true,"ip":"0.0.0.0","servicePort":80}` | API7 Gateway service settings for http |
176176
| gateway.http.additionalContainerPorts | list | `[]` | Support multiple http ports, See [Configuration](https://github.com/apache/apisix/blob/0bc65ea9acd726f79f80ae0abd8f50b7eb172e3d/conf/config-default.yaml#L24) |
177+
| gateway.http.ip | string | `"0.0.0.0"` | which ip to listen on for API7 Gateway http service. |
177178
| gateway.ingress | object | `{"annotations":{},"enabled":false,"hosts":[{"host":"apisix.local","paths":[]}],"tls":[]}` | Using ingress access API7 Gateway service |
178179
| gateway.ingress.annotations | object | `{}` | Ingress annotations |
179180
| gateway.labelsOverride | object | `{}` | Override default labels assigned to API7 Gateway gateway resources |
180181
| gateway.livenessProbe | object | `{}` | kubernetes liveness probe. |
181182
| gateway.readinessProbe | object | `{}` | kubernetes readiness probe, we will provide a probe based on tcpSocket to gateway's HTTP port by default. |
182183
| gateway.stream | object | `{"enabled":false,"only":false,"tcp":[],"udp":[]}` | API7 Gateway service settings for stream. L4 proxy (TCP/UDP) |
183-
| gateway.tls | object | `{"additionalContainerPorts":[],"certCAFilename":"","containerPort":9443,"enabled":true,"existingCASecret":"","http2":{"enabled":true},"servicePort":443,"sslProtocols":"TLSv1.2 TLSv1.3"}` | API7 Gateway service settings for tls |
184+
| gateway.tls | object | `{"additionalContainerPorts":[],"certCAFilename":"","containerPort":9443,"enabled":true,"existingCASecret":"","http2":{"enabled":true},"ip":"0.0.0.0","servicePort":443,"sslProtocols":"TLSv1.2 TLSv1.3"}` | API7 Gateway service settings for tls |
184185
| gateway.tls.additionalContainerPorts | list | `[]` | Support multiple https ports, See [Configuration](https://github.com/apache/apisix/blob/0bc65ea9acd726f79f80ae0abd8f50b7eb172e3d/conf/config-default.yaml#L99) |
185186
| gateway.tls.certCAFilename | string | `""` | Filename be used in the gateway.tls.existingCASecret |
186187
| gateway.tls.existingCASecret | string | `""` | Specifies the name of Secret contains trusted CA certificates in the PEM format used to verify the certificate when APISIX needs to do SSL/TLS handshaking with external services (e.g. etcd) |
188+
| gateway.tls.ip | string | `"0.0.0.0"` | which ip to listen on for API7 Gateway https service. |
187189
| gateway.tls.sslProtocols | string | `"TLSv1.2 TLSv1.3"` | TLS protocols allowed to use. |
188190
| gateway.type | string | `"NodePort"` | API7 Gateway service type for user access itself |
189191
| global.imagePullSecrets | list | `[]` | Global Docker registry secret names as an array |

charts/gateway/templates/configmap.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ data:
1818
{{- end }}
1919
apisix: # universal configurations
2020
node_listen: # APISIX listening port
21-
- {{ .Values.gateway.http.containerPort }}
21+
- ip: {{ .Values.gateway.http.ip }}
22+
port: {{ .Values.gateway.http.containerPort }}
2223
{{- with .Values.gateway.http.additionalContainerPorts }}
2324
{{- toYaml . | nindent 8}}
2425
{{- end }}
@@ -114,7 +115,8 @@ data:
114115
ssl:
115116
enable: {{ .Values.gateway.tls.enabled }}
116117
listen:
117-
- port: {{ .Values.gateway.tls.containerPort }}
118+
- ip: {{ .Values.gateway.tls.ip }}
119+
port: {{ .Values.gateway.tls.containerPort }}
118120
enable_http2: {{ .Values.gateway.tls.http2.enabled }}
119121
{{- with .Values.gateway.tls.additionalContainerPorts }}
120122
{{- toYaml . | nindent 10}}

charts/gateway/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ gateway:
259259
# -- API7 Gateway service settings for http
260260
http:
261261
enabled: true
262+
# -- which ip to listen on for API7 Gateway http service.
263+
ip: 0.0.0.0
262264
servicePort: 80
263265
containerPort: 9080
264266
# -- Support multiple http ports, See [Configuration](https://github.com/apache/apisix/blob/0bc65ea9acd726f79f80ae0abd8f50b7eb172e3d/conf/config-default.yaml#L24)
@@ -271,6 +273,8 @@ gateway:
271273
# -- API7 Gateway service settings for tls
272274
tls:
273275
enabled: true
276+
# -- which ip to listen on for API7 Gateway https service.
277+
ip: 0.0.0.0
274278
servicePort: 443
275279
containerPort: 9443
276280
# -- Support multiple https ports, See [Configuration](https://github.com/apache/apisix/blob/0bc65ea9acd726f79f80ae0abd8f50b7eb172e3d/conf/config-default.yaml#L99)

0 commit comments

Comments
 (0)