From 82f2dc430fee34bfb9dda05242ccf729d491c355 Mon Sep 17 00:00:00 2001 From: Mikael Bergemalm Date: Thu, 19 Dec 2024 15:33:10 +0100 Subject: [PATCH] feat(helm): support dual-stack networking for load balancers --- install/helm/agones/templates/ping.yaml | 12 +++ .../agones/templates/service/allocation.yaml | 6 ++ install/helm/agones/values.yaml | 6 ++ .../docs/Installation/Install Agones/helm.md | 80 +++++++++++-------- 4 files changed, 70 insertions(+), 34 deletions(-) diff --git a/install/helm/agones/templates/ping.yaml b/install/helm/agones/templates/ping.yaml index d3c0ad4014..c2fe7179b2 100644 --- a/install/helm/agones/templates/ping.yaml +++ b/install/helm/agones/templates/ping.yaml @@ -158,6 +158,12 @@ metadata: spec: selector: agones.dev/role: ping +{{- if .Values.agones.ping.http.ipFamilyPolicy }} + ipFamilyPolicy: {{ .Values.agones.ping.http.ipFamilyPolicy }} +{{- end }} +{{- if .Values.agones.ping.http.ipFamilies }} + ipFamilies: {{ toYaml .Values.agones.ping.http.ipFamilies | nindent 4 }} +{{- end }} ports: - port: {{ .Values.agones.ping.http.port }} name: http @@ -198,6 +204,12 @@ metadata: spec: selector: agones.dev/role: ping +{{- if .Values.agones.ping.udp.ipFamilyPolicy }} + ipFamilyPolicy: {{ .Values.agones.ping.udp.ipFamilyPolicy }} +{{- end }} +{{- if .Values.agones.ping.udp.ipFamilies }} + ipFamilies: {{ toYaml .Values.agones.ping.udp.ipFamilies | nindent 4 }} +{{- end }} ports: - port: {{ .Values.agones.ping.udp.port }} name: udp diff --git a/install/helm/agones/templates/service/allocation.yaml b/install/helm/agones/templates/service/allocation.yaml index 8c538029f8..766f2fef78 100644 --- a/install/helm/agones/templates/service/allocation.yaml +++ b/install/helm/agones/templates/service/allocation.yaml @@ -33,6 +33,12 @@ metadata: spec: selector: multicluster.agones.dev/role: allocator +{{- if .Values.agones.allocator.service.ipFamilyPolicy }} + ipFamilyPolicy: {{ .Values.agones.allocator.service.ipFamilyPolicy }} +{{- end }} +{{- if .Values.agones.allocator.service.ipFamilies }} + ipFamilies: {{ toYaml .Values.agones.allocator.service.ipFamilies | nindent 4 }} +{{- end }} ports: {{- if .Values.agones.allocator.service.http.enabled }} - port: {{ .Values.agones.allocator.service.http.port }} diff --git a/install/helm/agones/values.yaml b/install/helm/agones/values.yaml index 26f768211b..c4b5f75a81 100644 --- a/install/helm/agones/values.yaml +++ b/install/helm/agones/values.yaml @@ -186,6 +186,8 @@ agones: loadBalancerIP: "" loadBalancerSourceRanges: [] annotations: {} + ipFamilyPolicy: "" + ipFamilies: [] udp: expose: true rateLimit: 20 @@ -195,6 +197,8 @@ agones: loadBalancerIP: "" loadBalancerSourceRanges: [] annotations: {} + ipFamilyPolicy: "" + ipFamilies: [] healthCheck: initialDelaySeconds: 3 periodSeconds: 3 @@ -238,6 +242,8 @@ agones: loadBalancerIP: "" loadBalancerSourceRanges: [] annotations: {} + ipFamilyPolicy: "" + ipFamilies: [] http: enabled: true appProtocol: "" diff --git a/site/content/en/docs/Installation/Install Agones/helm.md b/site/content/en/docs/Installation/Install Agones/helm.md index 7d6d6be2e4..d15d58de86 100644 --- a/site/content/en/docs/Installation/Install Agones/helm.md +++ b/site/content/en/docs/Installation/Install Agones/helm.md @@ -193,43 +193,52 @@ The following tables lists the configurable parameters of the Agones chart and t ### Ping Service -| Parameter | Description | Default | -|----------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------| -| `agones.ping.install` | Whether to install the [ping service][ping] | `true` | -| `agones.ping.replicas` | The number of replicas to run in the deployment | `2` | -| `agones.ping.http.expose` | Expose the http ping service via a Service | `true` | -| `agones.ping.http.response` | The string response returned from the http service | `ok` | -| `agones.ping.http.port` | The port to expose on the service | `80` | -| `agones.ping.http.serviceType` | The [Service Type][service] of the HTTP Service | `LoadBalancer` | -| `agones.ping.http.nodePort` | Static node port to use for HTTP ping service. (Only applies when `agones.ping.http.serviceType` is `NodePort`.) | `0` | -| `agones.ping.http.loadBalancerIP` | The [Load Balancer IP][loadBalancer] of the HTTP Service load balancer. Only works if the Kubernetes provider supports this option. | \`\` | -| `agones.ping.http.loadBalancerSourceRanges` | The [Load Balancer SourceRanges][loadBalancer] of the HTTP Service load balancer. Only works if the Kubernetes provider supports this option. | `[]` | -| `agones.ping.http.annotations` | [Annotations][annotations] added to the Agones ping http service | `{}` | -| `agones.ping.udp.expose` | Expose the udp ping service via a Service | `true` | -| `agones.ping.udp.rateLimit` | Number of UDP packets the ping service handles per instance, per second, per sender | `20` | -| `agones.ping.udp.port` | The port to expose on the service | `80` | -| `agones.ping.udp.serviceType` | The [Service Type][service] of the UDP Service | `LoadBalancer` | -| `agones.ping.udp.nodePort` | Static node port to use for UDP ping service. (Only applies when `agones.ping.udp.serviceType` is `NodePort`.) | `0` | -| `agones.ping.udp.loadBalancerIP` | The [Load Balancer IP][loadBalancer] of the UDP Service load balancer. Only works if the Kubernetes provider supports this option. | \`\` | -| `agones.ping.udp.loadBalancerSourceRanges` | The [Load Balancer SourceRanges][loadBalancer] of the UDP Service load balancer. Only works if the Kubernetes provider supports this option. | `[]` | -| `agones.ping.udp.annotations` | [Annotations][annotations] added to the Agones ping udp service | `{}` | -| `agones.ping.healthCheck.initialDelaySeconds` | Initial delay before performing the first probe (in seconds) | `3` | -| `agones.ping.healthCheck.periodSeconds` | Seconds between every liveness probe (in seconds) | `3` | -| `agones.ping.healthCheck.failureThreshold` | Number of times before giving up (in seconds) | `3` | -| `agones.ping.healthCheck.timeoutSeconds` | Number of seconds after which the probe times out (in seconds) | `1` | -| `agones.ping.resources` | Ping pods [resource requests/limit][resources] | `{}` | -| `agones.ping.nodeSelector` | Ping [node labels][nodeSelector] for pod assignment | `{}` | -| `agones.ping.tolerations` | Ping [toleration][toleration] labels for pod assignment | `[]` | -| `agones.ping.affinity` | Ping [affinity][affinity] settings for pod assignment | `{}` | -| `agones.ping.annotations` | [Annotations][annotations] added to the Agones ping pods | `{}` | -| `agones.ping.updateStrategy` | The [strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy) to apply to the allocator deployment | `{}` | -| `agones.ping.pdb.enabled` | Set to `true` to enable the creation of a [PodDisruptionBudget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) for the ping deployment | `false` | -| `agones.ping.pdb.minAvailable` | Description of the number of pods from that set that must still be available after the eviction, even in the absence of the evicted pod. Can be either an absolute number or a percentage. Mutually Exclusive with `maxUnavailable` | `1` | -| `agones.ping.pdb.maxUnavailable` | Description of the number of pods from that set that can be unavailable after the eviction. It can be either an absolute number or a percentage Mutually Exclusive with `minAvailable` | \`\` | -| `agones.ping.topologySpreadConstraints` | Ensures better resource utilization and high availability by evenly distributing Pods in the agones-system namespace | `{}` | +{{% feature expiryVersion="1.47.0" %}} + +| Parameter | Description | Default | +|----------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------| +| `agones.ping.install` | Whether to install the [ping service][ping] | `true` | +| `agones.ping.replicas` | The number of replicas to run in the deployment | `2` | +| `agones.ping.http.expose` | Expose the http ping service via a Service | `true` | +| `agones.ping.http.response` | The string response returned from the http service | `ok` | +| `agones.ping.http.port` | The port to expose on the service | `80` | +| `agones.ping.http.serviceType` | The [Service Type][service] of the HTTP Service | `LoadBalancer` | +| `agones.ping.http.nodePort` | Static node port to use for HTTP ping service. (Only applies when `agones.ping.http.serviceType` is `NodePort`.) | `0` | +| `agones.ping.http.loadBalancerIP` | The [Load Balancer IP][loadBalancer] of the HTTP Service load balancer. Only works if the Kubernetes provider supports this option. | \`\` | +| `agones.ping.http.loadBalancerSourceRanges` | The [Load Balancer SourceRanges][loadBalancer] of the HTTP Service load balancer. Only works if the Kubernetes provider supports this option. | `[]` | +| `agones.ping.http.ipFamilyPolicy` | The `ipFamilyPolicy` setting for the Load Balancer. Kubernetes default is `SingleStack`. Set to `RequireDualStack` or `PreferDualStack` for dual-stack IPv4/IPv6 support if the Kubernetes provider supports this option. | \`\` | +| `agones.ping.http.ipFamilies` | The `ipFamilies` setting for the Load Balancer. Set to `IPv4` (default) or `IPv6` or both in combination with dual-stack `ipFamilyPolicy` setting. | `[]` | +| `agones.ping.http.annotations` | [Annotations][annotations] added to the Agones ping http service | `{}` | +| `agones.ping.udp.expose` | Expose the udp ping service via a Service | `true` | +| `agones.ping.udp.rateLimit` | Number of UDP packets the ping service handles per instance, per second, per sender | `20` | +| `agones.ping.udp.port` | The port to expose on the service | `80` | +| `agones.ping.udp.serviceType` | The [Service Type][service] of the UDP Service | `LoadBalancer` | +| `agones.ping.udp.nodePort` | Static node port to use for UDP ping service. (Only applies when `agones.ping.udp.serviceType` is `NodePort`.) | `0` | +| `agones.ping.udp.loadBalancerIP` | The [Load Balancer IP][loadBalancer] of the UDP Service load balancer. Only works if the Kubernetes provider supports this option. | \`\` | +| `agones.ping.udp.loadBalancerSourceRanges` | The [Load Balancer SourceRanges][loadBalancer] of the UDP Service load balancer. Only works if the Kubernetes provider supports this option. | `[]` | +| `agones.ping.udp.annotations` | [Annotations][annotations] added to the Agones ping udp service | `{}` | +| `agones.ping.udp.ipFamilyPolicy` | The `ipFamilyPolicy` setting for the Load Balancer. Kubernetes default is `SingleStack`. Set to `RequireDualStack` or `PreferDualStack` for dual-stack IPv4/IPv6 support if the Kubernetes provider supports this option. | \`\` | +| `agones.ping.udp.ipFamilies` | The `ipFamilies` setting for the Load Balancer. Set to `IPv4` (default) or `IPv6` or both in combination with dual-stack `ipFamilyPolicy` setting. | `[]` | +| `agones.ping.healthCheck.initialDelaySeconds` | Initial delay before performing the first probe (in seconds) | `3` | +| `agones.ping.healthCheck.periodSeconds` | Seconds between every liveness probe (in seconds) | `3` | +| `agones.ping.healthCheck.failureThreshold` | Number of times before giving up (in seconds) | `3` | +| `agones.ping.healthCheck.timeoutSeconds` | Number of seconds after which the probe times out (in seconds) | `1` | +| `agones.ping.resources` | Ping pods [resource requests/limit][resources] | `{}` | +| `agones.ping.nodeSelector` | Ping [node labels][nodeSelector] for pod assignment | `{}` | +| `agones.ping.tolerations` | Ping [toleration][toleration] labels for pod assignment | `[]` | +| `agones.ping.affinity` | Ping [affinity][affinity] settings for pod assignment | `{}` | +| `agones.ping.annotations` | [Annotations][annotations] added to the Agones ping pods | `{}` | +| `agones.ping.updateStrategy` | The [strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy) to apply to the allocator deployment | `{}` | +| `agones.ping.pdb.enabled` | Set to `true` to enable the creation of a [PodDisruptionBudget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) for the ping deployment | `false` | +| `agones.ping.pdb.minAvailable` | Description of the number of pods from that set that must still be available after the eviction, even in the absence of the evicted pod. Can be either an absolute number or a percentage. Mutually Exclusive with `maxUnavailable` | `1` | +| `agones.ping.pdb.maxUnavailable` | Description of the number of pods from that set that can be unavailable after the eviction. It can be either an absolute number or a percentage Mutually Exclusive with `minAvailable` | \`\` | +| `agones.ping.topologySpreadConstraints` | Ensures better resource utilization and high availability by evenly distributing Pods in the agones-system namespace | `{}` | + +{{% /feature %}} ### Allocator Service +{{% feature publishVersion="1.47.0" %}} | Parameter | Description | Default | | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | @@ -246,6 +255,8 @@ The following tables lists the configurable parameters of the Agones chart and t | `agones.allocator.service.loadBalancerIP` | The [Load Balancer IP][loadBalancer] of the Agones allocator load balancer. Only works if the Kubernetes provider supports this option. | \`\` | | `agones.allocator.service.loadBalancerSourceRanges` | The [Load Balancer SourceRanges][loadBalancer] of the Agones allocator load balancer. Only works if the Kubernetes provider supports this option. | `[]` | | `agones.allocator.service.annotations` | [Annotations][annotations] added to the Agones allocator service | `{}` | +| `agones.allocator.service.ipFamilyPolicy` | The `ipFamilyPolicy` setting for the Load Balancer. Kubernetes default is `SingleStack`. Set to `RequireDualStack` or `PreferDualStack` for dual-stack IPv4/IPv6 support if the Kubernetes provider supports this option. | \`\` | +| `agones.allocator.service.ipFamilies` | The `ipFamilies` setting for the Load Balancer. Set to `IPv4` (default) or `IPv6` or both in combination with dual-stack `ipFamilyPolicy` setting. | `[]` | | `agones.allocator.service.http.enabled` | If true the [allocator service][allocator] will respond to [REST requests][rest-requests] | `true` | | `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.port` | The port that is exposed externally by the [allocator service][allocator] for [REST requests][rest-requests] | `443` | @@ -288,6 +299,7 @@ The following tables lists the configurable parameters of the Agones chart and t | `agones.allocator.topologySpreadConstraints` | Ensures better resource utilization and high availability by evenly distributing Pods in the agones-system namespace | `{}` | | `agones.allocator.externalTrafficPolicy` | The `externalTrafficPolicy` for the Agones allocator service | `Cluster` | +{{% /feature %}} ### Extensions