diff --git a/charts/gateway/Chart.yaml b/charts/gateway/Chart.yaml index becc6ff..a1e7dc7 100644 --- a/charts/gateway/Chart.yaml +++ b/charts/gateway/Chart.yaml @@ -14,7 +14,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.40 +version: 0.2.41 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/gateway/templates/_pod.tpl b/charts/gateway/templates/_pod.tpl index cb23087..b16c6fb 100644 --- a/charts/gateway/templates/_pod.tpl +++ b/charts/gateway/templates/_pod.tpl @@ -76,6 +76,9 @@ spec: {{- if and .Values.apisix.hostNetwork .Values.gateway.http.ip }} hostIP: {{ .Values.gateway.http.ip }} {{- end }} + {{- if .Values.gateway.http.hostPort }} + hostPort: {{ .Values.gateway.http.hostPort }} + {{- end }} {{- range .Values.gateway.http.additionalContainerPorts }} - name: http-{{ .port | toString }} containerPort: {{ .port }} @@ -83,6 +86,9 @@ spec: {{- if and $global.Values.apisix.hostNetwork .ip }} hostIP: {{ .ip }} {{- end }} + {{- if .hostPort }} + hostPort: {{ .hostPort }} + {{- end }} {{- end }} - name: tls containerPort: {{ .Values.gateway.tls.containerPort }} @@ -90,12 +96,18 @@ spec: {{- if and .Values.apisix.hostNetwork .Values.gateway.tls.ip }} hostIP: {{ .Values.gateway.tls.ip }} {{- end }} + {{- if .Values.gateway.tls.hostPort }} + hostPort: {{ .Values.gateway.tls.hostPort }} + {{- end }} {{- range .Values.gateway.tls.additionalContainerPorts }} - name: tls-{{ .port | toString }} containerPort: {{ .port }} {{- if and $global.Values.apisix.hostNetwork .ip }} hostIP: {{ .ip }} {{- end }} + {{- if .hostPort }} + hostPort: {{ .hostPort }} + {{- end }} protocol: TCP {{- end }} {{- if .Values.admin.enabled }} diff --git a/charts/gateway/values.yaml b/charts/gateway/values.yaml index 945651c..f8656ec 100644 --- a/charts/gateway/values.yaml +++ b/charts/gateway/values.yaml @@ -300,14 +300,17 @@ gateway: ip: 0.0.0.0 servicePort: 80 containerPort: 9080 + # hostPort: 9080 # backlog: 1024 # sets the backlog parameter in the listen() call that limits, the maximum length for the queue of pending connections. By default, backlog is set to -1 on FreeBSD, DragonFly BSD, and macOS, and to 511 on other platforms. # -- Support multiple http ports, See [Configuration](https://github.com/apache/apisix/blob/0bc65ea9acd726f79f80ae0abd8f50b7eb172e3d/conf/config-default.yaml#L24) additionalContainerPorts: [] # - port: 9081 + # hostPort: 9081 # enable_http2: true # If not set, the default value is `false`. # backlog: 1024 # - ip: 127.0.0.2 # Specific IP, If not set, the default value is `0.0.0.0`. # port: 9082 + # hostPort: 9082 # enable_http2: true # backlog: 1024 # -- API7 Gateway service settings for tls @@ -317,11 +320,13 @@ gateway: ip: 0.0.0.0 servicePort: 443 containerPort: 9443 + # hostPort: 9443 # backlog: 1024 # -- Support multiple https ports, See [Configuration](https://github.com/apache/apisix/blob/0bc65ea9acd726f79f80ae0abd8f50b7eb172e3d/conf/config-default.yaml#L99) additionalContainerPorts: [] # - ip: 127.0.0.3 # Specific IP, If not set, the default value is `0.0.0.0`. # port: 9445 + # hostPort: 9445 # enable_http2: true # backlog: 1024 # -- 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)