diff --git a/charts/apisix/templates/service-gateway.yaml b/charts/apisix/templates/service-gateway.yaml index 7797435a..28214992 100644 --- a/charts/apisix/templates/service-gateway.yaml +++ b/charts/apisix/templates/service-gateway.yaml @@ -58,8 +58,11 @@ spec: {{- end }} {{- range .Values.service.http.additionalContainerPorts }} - name: apisix-gateway-{{ .port | toString }} - port: {{ .port }} + port: {{ or .servicePort .port }} targetPort: {{ .port }} + {{- if not (empty .nodePort) }} + nodePort: {{ .nodePort }} + {{- end}} protocol: TCP {{- end }} {{- if or .Values.apisix.ssl.enabled }} diff --git a/charts/apisix/values.yaml b/charts/apisix/values.yaml index f552c7dc..da8348af 100644 --- a/charts/apisix/values.yaml +++ b/charts/apisix/values.yaml @@ -180,7 +180,8 @@ service: # -- Support multiple http ports, See [Configuration](https://github.com/apache/apisix/blob/0bc65ea9acd726f79f80ae0abd8f50b7eb172e3d/conf/config-default.yaml#L24) additionalContainerPorts: [] # - port: 9081 - # enable_http2: true # If not set, the default value is `false`. + # servicePort: 8080 # Optional, if not set, `.port` value will be used. + # nodePort: 303030 # Optional # - ip: 127.0.0.2 # Specific IP, If not set, the default value is `0.0.0.0`. # port: 9082 # enable_http2: true