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

Added option to hardcode load balancer IP for allocator. #1766

Merged
merged 2 commits into from
Aug 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion install/helm/agones/templates/service/allocation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

{{- $useLoadBalancerIP := and (ne .Values.agones.allocator.http.loadBalancerIP "") (eq .Values.agones.allocator.http.serviceType "LoadBalancer") }}
{{- if .Values.agones.allocator.install }}
# Define a Service for the agones-allocator
apiVersion: v1
Expand All @@ -38,6 +39,9 @@ spec:
targetPort: 8443
protocol: TCP
type: {{ .Values.agones.allocator.http.serviceType }}
{{- if $useLoadBalancerIP }}
loadBalancerIP: {{ .Values.agones.allocator.http.loadBalancerIP }}
{{- end }}

---
# Deploy a pod to run the agones-allocator code
Expand Down Expand Up @@ -241,7 +245,7 @@ data:

---
# Allocation TLS certs
{{- $cert := genSignedCert "" nil nil 3650 $ca }}
{{- $cert := genSignedCert "" ($useLoadBalancerIP | ternary (list .Values.agones.allocator.http.loadBalancerIP) nil) nil 3650 $ca }}
apiVersion: v1
kind: Secret
type: kubernetes.io/tls
Expand Down
1 change: 1 addition & 0 deletions install/helm/agones/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ agones:
http:
port: 443
serviceType: LoadBalancer
loadBalancerIP: ""
devloop0 marked this conversation as resolved.
Show resolved Hide resolved
annotations: {}
generateTLS: true
generateClientTLS: true
Expand Down
4 changes: 3 additions & 1 deletion site/content/en/docs/Installation/Install Agones/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ The following tables lists the configurable parameters of the Agones chart and t

| Parameter | Description | Default |
| --------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------- |
| | | |
| `agones.allocator.http.loadBalancerIP` | The [Load Balancer IP][loadBalancerIP] of the Agones allocator load balancer. Only works if the Kubernetes provider supports this option. | "" |

{{% /feature %}}

[toleration]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
Expand All @@ -239,6 +240,7 @@ The following tables lists the configurable parameters of the Agones chart and t
[ping]: {{< ref "/docs/Guides/ping-service.md" >}}
[service]: https://kubernetes.io/docs/concepts/services-networking/service/
[allocator]: {{< ref "/docs/advanced/allocator-service.md" >}}
[loadBalancerIP]: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

Expand Down