From 0e2ea0381f764917189375a936c2e61a1a92ba92 Mon Sep 17 00:00:00 2001 From: Kent Iso Date: Fri, 1 Dec 2023 18:06:42 +0900 Subject: [PATCH] Add Headless Service for agones-allocator --- install/helm/agones/templates/service/allocation.yaml | 3 +++ install/helm/agones/values.yaml | 1 + site/content/en/docs/Installation/Install Agones/helm.md | 2 ++ 3 files changed, 6 insertions(+) diff --git a/install/helm/agones/templates/service/allocation.yaml b/install/helm/agones/templates/service/allocation.yaml index fa592ab8b0..a37907aa0a 100644 --- a/install/helm/agones/templates/service/allocation.yaml +++ b/install/helm/agones/templates/service/allocation.yaml @@ -72,6 +72,9 @@ spec: protocol: TCP {{- end }} type: {{ .Values.agones.allocator.service.serviceType }} +{{- if and (eq .Values.agones.allocator.service.serviceType "ClusterIP") (.Values.agones.allocator.service.headless) }} + clusterIP: None +{{- end }} {{- if $useLoadBalancerIP }} loadBalancerIP: {{ .Values.agones.allocator.service.loadBalancerIP }} {{- end }} diff --git a/install/helm/agones/values.yaml b/install/helm/agones/values.yaml index fa94e0b760..e0bddd30bd 100644 --- a/install/helm/agones/values.yaml +++ b/install/helm/agones/values.yaml @@ -212,6 +212,7 @@ agones: service: name: agones-allocator serviceType: LoadBalancer + headless: false loadBalancerIP: "" loadBalancerSourceRanges: [] annotations: {} diff --git a/site/content/en/docs/Installation/Install Agones/helm.md b/site/content/en/docs/Installation/Install Agones/helm.md index a2fa07e5b4..b82ece26ee 100644 --- a/site/content/en/docs/Installation/Install Agones/helm.md +++ b/site/content/en/docs/Installation/Install Agones/helm.md @@ -234,6 +234,7 @@ The following tables lists the configurable parameters of the Agones chart and t | `agones.allocator.replicas` | The number of replicas to run in the deployment | `3` | | `agones.allocator.service.name` | Service name for the allocator | `agones-allocator` | | `agones.allocator.service.serviceType` | The [Service Type][service] of the HTTP Service | `LoadBalancer` | +| `agones.allocator.service.headless` | If the ServiceType is set to "ClusterIP" and "true", the [Service Type][service] is the [Headless Service][headless-service] for allocator | `false` | | `agones.allocator.service.http.appProtocol` | The `appProtocol` to set on the Service for the http allocation port. If left blank, no value is set. | `` | | `agones.allocator.service.http.nodePort` | If the ServiceType is set to "NodePort", this is the NodePort that the allocator http service is exposed on. | `30000-32767` | | `agones.allocator.service.loadBalancerIP` | The [Load Balancer IP][loadBalancer] of the Agones allocator load balancer. Only works if the Kubernetes provider supports this option. | \`\` | @@ -391,6 +392,7 @@ The following tables lists the configurable parameters of the Agones chart and t [memory-constraints]: https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/ [ping]: {{< ref "/docs/Guides/ping-service.md" >}} [service]: https://kubernetes.io/docs/concepts/services-networking/service/ +[headless-service]: https://kubernetes.io/docs/concepts/services-networking/service/#headless-services [allocator]: {{< ref "/docs/advanced/allocator-service.md" >}} [loadBalancer]: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/