This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Install Code Blind

Install Code Blind in your existing Kubernetes cluster.

If you have not yet created a cluster, follow the instructions for the environment where you will be running Code Blind.

1 - Install Code Blind using YAML

We can install Code Blind to the cluster using an install.yaml file.

Installing Code Blind

Installing Code Blind using the pre-generated install.yaml file is the quickest, simplest way to get Code Blind up and running in your Kubernetes cluster:

kubectl create namespace agones-system
kubectl apply --server-side -f https://raw.githubusercontent.com/googleforgames/agones/release-1.38.0/install/yaml/install.yaml

You can also find the install.yaml in the latest agones-install zip from the releases archive.

Customizing your install

To change the configurable parameters in the install.yaml file, you can use helm template to generate a custom file locally without needing to use helm to install Code Blind into your cluster.

The following example sets the featureGates and generateTLS helm parameters and creates a customized install-custom.yaml file (note that the pull command was introduced in Helm version 3):

helm pull --untar https://agones.dev/chart/stable/agones-1.38.0.tgz && \
cd agones && \
helm template agones-manual --namespace agones-system  . \
  --set agones.controller.generateTLS=false \
  --set agones.allocator.generateTLS=false \
  --set agones.allocator.generateClientTLS=false \
  --set agones.crds.cleanupOnDelete=false \
  --set agones.featureGates="PlayerTracking=true" \
  > install-custom.yaml

Uninstalling Code Blind

To uninstall/delete the Code Blind deployment and delete agones-system namespace:

kubectl delete fleets --all --all-namespaces
kubectl delete gameservers --all --all-namespaces
kubectl delete -f https://raw.githubusercontent.com/googleforgames/agones/release-1.38.0/install/yaml/install.yaml
kubectl delete namespace agones-system

Note: It may take a couple of minutes until all resources described in install.yaml file are deleted.

Next Steps

2 - Install Code Blind using Helm

Install Code Blind on a Kubernetes cluster using the Helm package manager.

Prerequisites

Helm 3

Installing the Chart

To install the chart with the release name my-release using our stable helm repository:

helm repo add agones https://agones.dev/chart/stable
helm repo update
helm install my-release --namespace agones-system --create-namespace agones/agones

We recommend installing Code Blind in its own namespaces, such as agones-system as shown above. If you want to use a different namespace, you can use the helm --namespace parameter to specify.

When running in production, Code Blind should be scheduled on a dedicated pool of nodes, distinct from where Game Servers are scheduled for better isolation and resiliency. By default Code Blind prefers to be scheduled on nodes labeled with agones.dev/agones-system=true and tolerates node taint agones.dev/agones-system=true:NoExecute. If no dedicated nodes are available, Code Blind will run on regular nodes, but that’s not recommended for production use. For instructions on setting up a dedicated node pool for Code Blind, see the Code Blind installation instructions for your preferred environment.

The command deploys Code Blind on the Kubernetes cluster with the default configuration. The configuration section lists the parameters that can be configured during installation.

Namespaces

By default Code Blind is configured to work with game servers deployed in the default namespace. If you are planning to use another namespace you can configure Code Blind via the parameter gameservers.namespaces.

For example to use default and xbox namespaces:

kubectl create namespace xbox
helm install my-release agones/agones --set "gameservers.namespaces={default,xbox}" --namespace agones-system

If you want to add a new namespace afterward upgrade your release:

kubectl create namespace ps4
helm upgrade my-release agones/agones --reuse-values --set "gameservers.namespaces={default,xbox,ps4}" --namespace agones-system

Uninstalling the Chart

To uninstall/delete the my-release deployment:

helm uninstall my-release --namespace=agones-system

RBAC

By default, agones.rbacEnabled is set to true. This enables RBAC support in Code Blind and must be true if RBAC is enabled in your cluster.

The chart will take care of creating the required service accounts and roles for Code Blind.

If you have RBAC disabled, or to put it another way, ABAC enabled, you should set this value to false.

Configuration

The following tables lists the configurable parameters of the Code Blind chart and their default values.

General

ParameterDescriptionDefault
agones.featureGatesA URL query encoded string of Flags to enable/disable e.g. Example=true&OtherThing=false. Any value accepted by strconv.ParseBool(string) can be used as a boolean value``
agones.rbacEnabledCreates RBAC resources. Must be set for any cluster configured with RBACtrue
agones.registerWebhooksRegisters the webhooks used for the admission controllertrue
agones.registerApiServiceRegisters the apiservice(s) used for the Kubernetes API extensiontrue
agones.registerServiceAccountsAttempts to create service accounts for the controllerstrue
agones.createPriorityClassAttempts to create priority classes for the controllerstrue
agones.priorityClassNameName of the priority classes to createagones-system
agones.requireDedicatedNodesForces Code Blind system components to be scheduled on dedicated nodes, only applies to the GKE Standard without node auto-provisioningfalse

Custom Resource Definitions

ParameterDescriptionDefault
agones.crds.installInstall the CRDs with this chart. Useful to disable if you want to subchart (since crd-install hook is broken), so you can copy the CRDs into your own chart.true
agones.crds.cleanupOnDeleteRun the pre-delete hook to delete all GameServers and their backing Pods when deleting the helm chart, so that all CRDs can be removed on chart deletiontrue
agones.crds.cleanupJobTTLThe number of seconds for Kubernetes to delete the associated Job and Pods of the pre-delete hook after it completes, regardless if the Job is successful or not. Set to 0 to disable cleaning up the Job or the associated Pods.60

Metrics

ParameterDescriptionDefault
agones.metrics.prometheusServiceDiscoveryAdds annotations for Prometheus ServiceDiscovery (and also Strackdriver)true
agones.metrics.prometheusEnabledEnables controller metrics on port 8080 and path /metricstrue
agones.metrics.stackdriverEnabledEnables Stackdriver exporter of controller metricsfalse
agones.metrics.stackdriverProjectIDThis overrides the default gcp project id for use with stackdriver``
agones.metrics.stackdriverLabelsA set of default labels to add to all stackdriver metrics generated in form of key value pair (key=value,key2=value2). By default metadata are automatically added using Kubernetes API and GCP metadata enpoint.``
agones.metrics.serviceMonitor.intervalDefault scraping interval for ServiceMonitor30s

Service Accounts

ParameterDescriptionDefault
agones.serviceaccount.controller.nameService account name for the controlleragones-controller
agones.serviceaccount.controller.annotationsAnnotations added to the Code Blind controller service account{}
agones.serviceaccount.sdk.nameService account name for the sdkagones-sdk
agones.serviceaccount.sdk.annotationsA map of namespaces to maps of Annotations added to the Code Blind SDK service account for the specified namespaces{}
agones.serviceaccount.allocator.nameService account name for the allocatoragones-allocator
agones.serviceaccount.allocator.annotationsAnnotations added to the Code Blind allocator service account{}

Container Images

ParameterDescriptionDefault
agones.image.registryGlobal image registry for all the Code Blind system imagesus-docker.pkg.dev/agones-images/release
agones.image.tagGlobal image tag for all images1.38.0
agones.image.controller.nameImage name for the controlleragones-controller
agones.image.controller.pullPolicyImage pull policy for the controllerIfNotPresent
agones.image.controller.pullSecretImage pull secret for the controller, allocator, sdk and ping image. Should be created both in agones-system and default namespaces``
agones.image.sdk.nameImage name for the sdkagones-sdk
agones.image.sdk.tagImage tag for the sdkvalue of agones.image.tag
agones.image.sdk.cpuRequestThe cpu request for sdk server container30m
agones.image.sdk.cpuLimitThe cpu limit for the sdk server container0 (none)
agones.image.sdk.memoryRequestThe memory request for sdk server container0 (none)
agones.image.sdk.memoryLimitThe memory limit for the sdk server container0 (none)
agones.image.sdk.alwaysPullTells if the sdk image should always be pulledfalse
agones.image.ping.nameImage name for the ping serviceagones-ping
agones.image.ping.tagImage tag for the ping servicevalue of agones.image.tag
agones.image.ping.pullPolicyImage pull policy for the ping serviceIfNotPresent
agones.image.extensions.nameImage name for extensionsagones-extensions
agones.image.extensions.pullPolicyImage pull policy for extensionsIfNotPresent

Code Blind Controller

ParameterDescriptionDefault
agones.controller.replicasThe number of replicas to run in the agones-controller deployment.2
agones.controller.pdb.minAvailableDescription 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 maxUnavailable1
agones.controller.pdb.maxUnavailableDescription 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.controller.http.portPort to use for liveness probe service and metrics8080
agones.controller.healthCheck.initialDelaySecondsInitial delay before performing the first probe (in seconds)3
agones.controller.healthCheck.periodSecondsSeconds between every liveness probe (in seconds)3
agones.controller.healthCheck.failureThresholdNumber of times before giving up (in seconds)3
agones.controller.healthCheck.timeoutSecondsNumber of seconds after which the probe times out (in seconds)1
agones.controller.resourcesController resource requests/limit{}
agones.controller.generateTLSSet to true to generate TLS certificates or false to provide your own certificatestrue
agones.controller.tlsCertCustom TLS certificate provided as a string``
agones.controller.tlsKeyCustom TLS private key provided as a string``
agones.controller.nodeSelectorController node labels for pod assignment{}
agones.controller.tolerationsController toleration labels for pod assignment[]
agones.controller.affinityController affinity settings for pod assignment{}
agones.controller.annotationsAnnotations added to the Code Blind controller pods{}
agones.controller.numWorkersNumber of workers to spin per resource type100
agones.controller.apiServerQPSMaximum sustained queries per second that controller should be making against API Server400
agones.controller.apiServerQPSBurstMaximum burst queries per second that controller should be making against API Server500
agones.controller.logLevelCode Blind Controller Log level. Log only entries with that severity and aboveinfo
agones.controller.persistentLogsStore Code Blind controller logs in a temporary volume attached to a container for debuggingtrue
agones.controller.persistentLogsSizeLimitMBMaximum total size of all Code Blind container logs in MB10000
agones.controller.disableSecretDisables the creation of any allocator secrets. If true, you MUST provide the {agones.releaseName}-cert secrets before installation.false
agones.controller.customCertSecretPathRemap cert-manager path to server.crt and server.key{}
agones.controller.allocationApiService.annotationsAnnotations added to the Code Blind apiregistration{}
agones.controller.allocationApiService.disableCaBundleDisable ca-bundle so it can be injected by cert-managerfalse
agones.controller.validatingWebhook.annotationsAnnotations added to the Code Blind validating webhook{}
agones.controller.validatingWebhook.disableCaBundleDisable ca-bundle so it can be injected by cert-managerfalse
agones.controller.mutatingWebhook.annotationsAnnotations added to the Code Blind mutating webhook{}
agones.controller.mutatingWebhook.disableCaBundleDisable ca-bundle so it can be injected by cert-managerfalse
agones.controller.allocationBatchWaitTimeWait time between each allocation batch when performing allocations in controller mode500ms
agones.controller.topologySpreadConstraintsEnsures better resource utilization and high availability by evenly distributing Pods in the agones-system namespace{}

Ping Service

ParameterDescriptionDefault
agones.ping.installWhether to install the ping servicetrue
agones.ping.replicasThe number of replicas to run in the deployment2
agones.ping.http.exposeExpose the http ping service via a Servicetrue
agones.ping.http.responseThe string response returned from the http serviceok
agones.ping.http.portThe port to expose on the service80
agones.ping.http.serviceTypeThe Service Type of the HTTP ServiceLoadBalancer
agones.ping.http.nodePortStatic node port to use for HTTP ping service. (Only applies when agones.ping.http.serviceType is NodePort.)0
agones.ping.http.loadBalancerIPThe Load Balancer IP of the HTTP Service load balancer. Only works if the Kubernetes provider supports this option.``
agones.ping.http.loadBalancerSourceRangesThe Load Balancer SourceRanges of the HTTP Service load balancer. Only works if the Kubernetes provider supports this option.[]
agones.ping.http.annotationsAnnotations added to the Code Blind ping http service{}
agones.ping.udp.exposeExpose the udp ping service via a Servicetrue
agones.ping.udp.rateLimitNumber of UDP packets the ping service handles per instance, per second, per sender20
agones.ping.udp.portThe port to expose on the service80
agones.ping.udp.serviceTypeThe Service Type of the UDP ServiceLoadBalancer
agones.ping.udp.nodePortStatic node port to use for UDP ping service. (Only applies when agones.ping.udp.serviceType is NodePort.)0
agones.ping.udp.loadBalancerIPThe Load Balancer IP of the UDP Service load balancer. Only works if the Kubernetes provider supports this option.``
agones.ping.udp.loadBalancerSourceRangesThe Load Balancer SourceRanges of the UDP Service load balancer. Only works if the Kubernetes provider supports this option.[]
agones.ping.udp.annotationsAnnotations added to the Code Blind ping udp service{}
agones.ping.healthCheck.initialDelaySecondsInitial delay before performing the first probe (in seconds)3
agones.ping.healthCheck.periodSecondsSeconds between every liveness probe (in seconds)3
agones.ping.healthCheck.failureThresholdNumber of times before giving up (in seconds)3
agones.ping.healthCheck.timeoutSecondsNumber of seconds after which the probe times out (in seconds)1
agones.ping.resourcesPing pods resource requests/limit{}
agones.ping.nodeSelectorPing node labels for pod assignment{}
agones.ping.tolerationsPing toleration labels for pod assignment[]
agones.ping.affinityPing affinity settings for pod assignment{}
agones.ping.annotationsAnnotations added to the Code Blind ping pods{}
agones.ping.updateStrategyThe strategy to apply to the allocator deployment{}
agones.ping.pdb.enabledSet to true to enable the creation of a PodDisruptionBudget for the ping deploymentfalse
agones.ping.pdb.minAvailableDescription 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 maxUnavailable1
agones.ping.pdb.maxUnavailableDescription 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.topologySpreadConstraintsEnsures better resource utilization and high availability by evenly distributing Pods in the agones-system namespace{}

Allocator Service

ParameterDescriptionDefault
agones.allocator.apiServerQPSMaximum sustained queries per second that an allocator should be making against API Server400
agones.allocator.apiServerQPSBurstMaximum burst queries per second that an allocator should be making against API Server500
agones.allocator.remoteAllocationTimeoutRemote allocation call timeout.10s
agones.allocator.totalRemoteAllocationTimeoutTotal remote allocation timeout including retries.30s
agones.allocator.logLevelCode Blind Allocator Log level. Log only entries with that severity and aboveinfo
agones.allocator.installWhether to install the allocator servicetrue
agones.allocator.replicasThe number of replicas to run in the deployment3
agones.allocator.service.nameService name for the allocatoragones-allocator
agones.allocator.service.serviceTypeThe Service Type of the HTTP ServiceLoadBalancer
agones.allocator.service.clusterIPThe Cluster IP of the Code Blind allocator. If you want Headless Service for Code Blind Allocator, you can set None to clusterIP.``
agones.allocator.service.loadBalancerIPThe Load Balancer IP of the Code Blind allocator load balancer. Only works if the Kubernetes provider supports this option.``
agones.allocator.service.loadBalancerSourceRangesThe Load Balancer SourceRanges of the Code Blind allocator load balancer. Only works if the Kubernetes provider supports this option.[]
agones.allocator.service.annotationsAnnotations added to the Code Blind allocator service{}
agones.allocator.service.http.enabledIf true the allocator service will respond to REST requeststrue
agones.allocator.service.http.appProtocolThe appProtocol to set on the Service for the http allocation port. If left blank, no value is set.``
agones.allocator.service.http.portThe port that is exposed externally by the allocator service for REST requests443
agones.allocator.service.http.portNameThe name of exposed porthttp
agones.allocator.service.http.targetPortThe port that is used by the allocator pod to listen for REST requests. Note that the allocator server cannot bind to low numbered ports.8443
agones.allocator.service.http.nodePortIf the ServiceType is set to “NodePort”, this is the NodePort that the allocator http service is exposed on.30000-32767
agones.allocator.service.grpc.enabledIf true the allocator service will respond to gRPC requeststrue
agones.allocator.service.grpc.portThe port that is exposed externally by the allocator service for gRPC requests443
agones.allocator.service.grpc.portNameThe name of exposed port``
agones.allocator.service.grpc.appProtocolThe appProtocol to set on the Service for the gRPC allocation port. If left blank, no value is set.``
agones.allocator.service.grpc.nodePortIf the ServiceType is set to “NodePort”, this is the NodePort that the allocator gRPC service is exposed on.30000-32767
agones.allocator.service.grpc.targetPortThe port that is used by the allocator pod to listen for gRPC requests. Note that the allocator server cannot bind to low numbered ports.8443
agones.allocator.generateClientTLSSet to true to generate client TLS certificates or false to provide certificates in certs/allocator/allocator-client.default/*true
agones.allocator.generateTLSSet to true to generate TLS certificates or false to provide your own certificatestrue
agones.allocator.disableMTLSTurns off client cert authentication for incoming connections to the allocator.false
agones.allocator.disableTLSTurns off TLS security for incoming connections to the allocator.false
agones.allocator.disableSecretCreationDisables the creation of any allocator secrets. If true, you MUST provide the allocator-tls, allocator-tls-ca, and allocator-client-ca secrets before installation.false
agones.allocator.tlsCertCustom TLS certificate provided as a string``
agones.allocator.tlsKeyCustom TLS private key provided as a string``
agones.allocator.clientCAsA map of secret key names to allowed client CA certificates provided as strings{}
agones.allocator.tolerationsAllocator toleration labels for pod assignment[]
agones.allocator.affinityAllocator affinity settings for pod assignment{}
agones.allocator.annotationsAnnotations added to the Code Blind allocator pods{}
agones.allocator.resourcesAllocator pods resource requests/limit{}
agones.allocator.labelsLabels Added to the Code Blind Allocator pods{}
agones.allocator.readiness.initialDelaySecondsInitial delay before performing the first probe (in seconds)3
agones.allocator.readiness.periodSecondsSeconds between every liveness probe (in seconds)3
agones.allocator.readiness.failureThresholdNumber of times before giving up (in seconds)3
agones.allocator.nodeSelectorAllocator node labels for pod assignment{}
agones.allocator.serviceMetrics.nameSecond Service name for the allocatoragones-allocator-metrics-service
agones.allocator.serviceMetrics.annotationsAnnotations added to the Code Blind allocator second Service{}
agones.allocator.serviceMetrics.http.portThe port that is exposed within cluster by the allocator service for http requests8080
agones.allocator.serviceMetrics.http.portNameThe name of exposed porthttp
agones.allocator.allocationBatchWaitTimeWait time between each allocation batch when performing allocations in allocator mode500ms
agones.allocator.updateStrategyThe strategy to apply to the ping deployment{}
agones.allocator.pdb.enabledSet to true to enable the creation of a PodDisruptionBudget for the allocator deploymentfalse
agones.allocator.pdb.minAvailableDescription 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 maxUnavailable1
agones.allocator.pdb.maxUnavailableDescription 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.allocator.topologySpreadConstraintsEnsures better resource utilization and high availability by evenly distributing Pods in the agones-system namespace{}

Extensions

ParameterDescriptionDefault
agones.extensions.http.portPort to use for liveness probe service and metrics8080
agones.extensions.healthCheck.initialDelaySecondsInitial delay before performing the first probe (in seconds)3
agones.extensions.healthCheck.periodSecondsSeconds between every liveness probe (in seconds)3
agones.extensions.healthCheck.failureThresholdNumber of times before giving up (in seconds)3
agones.extensions.healthCheck.timeoutSecondsNumber of seconds after which the probe times out (in seconds)1
agones.extensions.resourcesExtensions resource requests/limit{}
agones.extensions.generateTLSSet to true to generate TLS certificates or false to provide your own certificatestrue
agones.extensions.tlsCertCustom TLS certificate provided as a string``
agones.extensions.tlsKeyCustom TLS private key provided as a string``
agones.extensions.nodeSelectorExtensions node labels for pod assignment{}
agones.extensions.tolerationsExtensions toleration labels for pod assignment[]
agones.extensions.affinityExtensions affinity settings for pod assignment{}
agones.extensions.annotationsAnnotations added to the Code Blind extensions pods{}
agones.extensions.numWorkersNumber of workers to spin per resource type100
agones.extensions.apiServerQPSMaximum sustained queries per second that extensions should be making against API Server400
agones.extensions.apiServerQPSBurstMaximum burst queries per second that extensions should be making against API Server500
agones.extensions.logLevelCode Blind Extensions Log level. Log only entries with that severity and aboveinfo
agones.extensions.persistentLogsStore Code Blind extensions logs in a temporary volume attached to a container for debuggingtrue
agones.extensions.persistentLogsSizeLimitMBMaximum total size of all Code Blind container logs in MB10000
agones.extensions.disableSecretDisables the creation of any allocator secrets. If true, you MUST provide the {agones.releaseName}-cert secrets before installation.false
agones.extensions.customCertSecretPathRemap cert-manager path to server.crt and server.key{}
agones.extensions.allocationApiService.annotationsAnnotations added to the Code Blind apiregistration{}
agones.extensions.allocationApiService.disableCaBundleDisable ca-bundle so it can be injected by cert-managerfalse
agones.extensions.validatingWebhook.annotationsAnnotations added to the Code Blind validating webhook{}
agones.extensions.validatingWebhook.disableCaBundleDisable ca-bundle so it can be injected by cert-managerfalse
agones.extensions.mutatingWebhook.annotationsAnnotations added to the Code Blind mutating webhook{}
agones.extensions.mutatingWebhook.disableCaBundleDisable ca-bundle so it can be injected by cert-managerfalse
agones.extensions.allocationBatchWaitTimeWait time between each allocation batch when performing allocations in controller mode500ms
agones.extensions.pdb.minAvailableDescription 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 maxUnavailable1
agones.extensions.pdb.maxUnavailableDescription 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.extensions.replicasThe number of replicas to run in the deployment2
agones.extensions.topologySpreadConstraintsEnsures better resource utilization and high availability by evenly distributing Pods in the agones-system namespace{}

GameServers

ParameterDescriptionDefault
gameservers.namespacesa list of namespaces you are planning to use to deploy game servers["default"]
gameservers.minPortMinimum port to use for dynamic port allocation7000
gameservers.maxPortMaximum port to use for dynamic port allocation8000
gameservers.podPreserveUnknownFieldsDisable field pruning and schema validation on the Pod template for a GameServer definitionfalse

Helm Installation

ParameterDescriptionDefault
helm.installTestsAdd an ability to run helm test agones to verify the installationfalse

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

helm install my-release --namespace agones-system \
  --set gameservers.minPort=1000,gameservers.maxPort=5000 agones

The above command will deploy Code Blind controllers to agones-system namespace. Additionally Code Blind will use a dynamic GameServers’ port allocation range of 1000-5000.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

helm install my-release --namespace agones-system -f values.yaml agones/agones

Helm test

This test would create a GameServer resource and delete it afterwards.

Check the Code Blind installation by running the following command:

helm test my-release -n agones-system

You should see a successful output similar to this :

NAME: my-release
LAST DEPLOYED: Wed Mar 29 06:13:23 2023
NAMESPACE: agones-system
STATUS: deployed
REVISION: 4
TEST SUITE:     my-release-test
Last Started:   Wed Mar 29 06:17:52 2023
Last Completed: Wed Mar 29 06:18:10 2023
Phase:          Succeeded

Controller TLS Certificates

By default agones chart generates tls certificates used by the admission controller, while this is handy, it requires the agones controller to restart on each helm upgrade command.

Manual

For most use cases the controller would have required a restart anyway (eg: controller image updated). However if you really need to avoid restarts we suggest that you turn off tls automatic generation (agones.controller.generateTLS to false) and provide your own certificates (certs/server.crt,certs/server.key).

Cert-Manager

Another approach is to use cert-manager.io solution for cluster level certificate management.

In order to use the cert-manager solution, first install cert-manager on the cluster. Then, configure an Issuer/ClusterIssuer resource and last configure a Certificate resource to manage controller Secret. Make sure to configure the Certificate based on your system’s requirements, including the validity duration.

Here is an example of using a self-signed ClusterIssuer for configuring controller Secret where secret name is my-release-cert or {{ template "agones.fullname" . }}-cert:

#!/bin/bash
# Create a self-signed ClusterIssuer
cat <<EOF | kubectl apply -f -
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: selfsigned
spec:
  selfSigned: {}
EOF

# Create a Certificate with IP for the my-release-cert )
cat <<EOF | kubectl apply -f -
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: my-release-agones-cert
  namespace: agones-system
spec:
  dnsNames:
    - agones-controller-service.agones-system.svc
  secretName: my-release-agones-cert
  issuerRef:
    name: selfsigned
    kind: ClusterIssuer
EOF

After the certificates are generated, we will want to inject caBundle into the controller and extensions webhook and disable the controller and extensions secret creation through the following values.yaml file.:

agones:
  controller:
    disableSecret: true
    customCertSecretPath:
    - key: ca.crt
      path: ca.crt
    - key: tls.crt
      path: server.crt
    - key: tls.key
      path: server.key
    allocationApiService:
      annotations:
        cert-manager.io/inject-ca-from: agones-system/my-release-agones-cert
      disableCaBundle: true
    validatingWebhook:
      annotations:
        cert-manager.io/inject-ca-from: agones-system/my-release-agones-cert
      disableCaBundle: true
    mutatingWebhook:
      annotations:
        cert-manager.io/inject-ca-from: agones-system/my-release-agones-cert
      disableCaBundle: true
  extensions:
    disableSecret: true
    customCertSecretPath:
    - key: ca.crt
      path: ca.crt
    - key: tls.crt
      path: server.crt
    - key: tls.key
      path: server.key
    allocationApiService:
      annotations:
        cert-manager.io/inject-ca-from: agones-system/my-release-agones-cert
      disableCaBundle: true
    validatingWebhook:
      annotations:
        cert-manager.io/inject-ca-from: agones-system/my-release-agones-cert
      disableCaBundle: true
    mutatingWebhook:
      annotations:
        cert-manager.io/inject-ca-from: agones-system/my-release-agones-cert
      disableCaBundle: true

After copying the above yaml into a values.yaml file, use below command to install Code Blind:

helm install my-release --namespace agones-system --create-namespace --values values.yaml agones/agones

Reserved Allocator Load Balancer IP

In order to reuse the existing load balancer IP on upgrade or install the agones-allocator service as a LoadBalancer using a reserved static IP, a user can specify the load balancer’s IP with the agones.allocator.http.loadBalancerIP helm configuration parameter value. By setting the loadBalancerIP value:

  1. The LoadBalancer is created with the specified IP, if supported by the cloud provider.
  2. A self-signed server TLS certificate is generated for the IP, used by the agones-allocator service.

Next Steps