Skip to content

Commit a5975c3

Browse files
authored
feat: support setting loadBalancerClass for gateway service (#203)
1 parent f2f7171 commit a5975c3

File tree

5 files changed

+14
-2
lines changed

5 files changed

+14
-2
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.22
17+
version: 0.2.23
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
@@ -170,7 +170,7 @@ The command removes all the Kubernetes components associated with the chart and
170170
| extraVolumeMounts | list | `[]` | Additional `volume`, See [Kubernetes Volumes](https://kubernetes.io/docs/concepts/storage/volumes/) for the detail. |
171171
| extraVolumes | list | `[]` | Additional `volume`, See [Kubernetes Volumes](https://kubernetes.io/docs/concepts/storage/volumes/) for the detail. |
172172
| fullnameOverride | string | `""` | |
173-
| gateway.externalIPs | list | `[]` | |
173+
| 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"` | |
175175
| gateway.http | object | `{"additionalContainerPorts":[],"containerPort":9080,"enabled":true,"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) |

charts/gateway/templates/service-admin.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ metadata:
1414
spec:
1515
type: {{ .Values.admin.type }}
1616
{{- if eq .Values.admin.type "LoadBalancer" }}
17+
{{- if .Values.admin.loadBalancerClass }}
18+
loadBalancerClass: {{ .Values.admin.loadBalancerClass }}
19+
{{- end }}
1720
{{- if .Values.admin.loadBalancerIP }}
1821
loadBalancerIP: {{ .Values.admin.loadBalancerIP }}
1922
{{- end }}

charts/gateway/templates/service-gateway.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ spec:
1717
externalTrafficPolicy: {{ .Values.gateway.externalTrafficPolicy }}
1818
{{- end }}
1919
{{- if eq .Values.gateway.type "LoadBalancer" }}
20+
{{- if .Values.gateway.loadBalancerClass }}
21+
loadBalancerClass: {{ .Values.gateway.loadBalancerClass }}
22+
{{- end }}
2023
{{- if .Values.gateway.loadBalancerIP }}
2124
loadBalancerIP: {{ .Values.gateway.loadBalancerIP }}
2225
{{- end }}

charts/gateway/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,11 @@ gateway:
244244
# ref: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
245245
externalTrafficPolicy: Cluster
246246
# type: LoadBalancer
247+
# loadBalancerClass: "my-loadbalancer-class"
248+
# loadBalancerIP: a.b.c.d
249+
# loadBalancerSourceRanges:
250+
# - "143.231.0.0/16"
251+
# -- IPs for which nodes in the cluster will also accept traffic for the servic
247252
# annotations:
248253
# service.beta.kubernetes.io/aws-load-balancer-type: nlb
249254
externalIPs: []
@@ -311,6 +316,7 @@ admin:
311316
enabled: false
312317
# -- admin service type
313318
type: ClusterIP
319+
# loadBalancerClass: "my-loadbalancer-class"
314320
# loadBalancerIP: a.b.c.d
315321
# loadBalancerSourceRanges:
316322
# - "143.231.0.0/16"

0 commit comments

Comments
 (0)