Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allocateLoadBalancerNodePorts option #280

Merged
merged 7 commits into from
Mar 12, 2024
1 change: 1 addition & 0 deletions helm-charts/azure-api-management-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ their default values.
| `observability.statsD.tagFormat` | Defines the [tagging format](https://github.com/prometheus/statsd_exporter#tagging-extensions) in StatsD metrics as per the official docs. Value can be `none`, `librato`, `dogStatsD`, `influxDB`. Learn more in [our documentation](https://docs.microsoft.com/azure/api-management/how-to-configure-local-metrics-logs#configure-the-self-hosted-gateway-to-emit-metrics). | N/A |
| `service.type` | Type of Kubernetes service to use to expose to serve traffic | `ClusterIP` |
| `service.annotations` | Annotations to add to the Kubernetes service | `{}` |
| `service.loadBalancer.allocateNodePorts` | Defines if node ports will be automatically allocated for services with type `LoadBalancer` | `true` |
| `service.loadBalancer.ip` | Attach a pre-existing static IP to a `LoadBalancer` type service. Learn more in the [Kubernetes docs](https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer). | |
| `service.ports.http` | Port for HTTP traffic on service for other pods to talk to | `8080` |
| `service.ports.https` | Port for HTTPs traffic on service for other pods to talk to | `8081` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ metadata:
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if eq .Values.service.type "LoadBalancer" }}
{{- if (.Values.service.loadBalancer).ip }}
loadBalancerIP: {{ .Values.service.loadBalancer.ip }}
{{- end }}
{{- if eq .Values.service.loadBalancer.allocateNodePorts false }}
allocateLoadBalancerNodePorts: false
{{- end }}
{{- end }}
ports:
- port: {{ .Values.service.ports.http }}
Expand Down
2 changes: 2 additions & 0 deletions helm-charts/azure-api-management-gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ dapr:

service:
type: ClusterIP
loadBalancer:
allocateNodePorts: true
ports:
http: 8080
https: 8081
Expand Down
Loading