This guide provides comprehensive documentation for all make variables and targets in the Agones build system.
The version of this build. Version defaults to the short hash of the latest commit.
The registry that is being used to store docker images. It doesn't have default value and has to be set explicitly.
The chart registry that is being used to store helm charts. It doesn't have default value and has to be set explicitly.
If not set it would use the GCP_BUCKET_CHARTS.
The Kubernetes config file used to access the cluster. Defaults to ~/.kube/config - the file used by default by kubectl.
The (gcloud) test cluster that is being worked against. Defaults to test-cluster.
Your GCP project for deploying GKE cluster. Defaults to gcloud default project settings.
If specified basic authentication would be enabled for your cluster with username "admin".
Empty string "" would disable basic authentication.
The name of the secret required to pull the Agones images, if needed. If unset, no pull secret will be used.
The full path of the file containing the secret for pulling the Agones images, in case it's needed.
If set, make install will install this secret in both the agones-system (for pulling the controller image)
and default (for pulling the sdk image) repositories.
Build Windows container images for Agones.
This option is enabled by default via implicit make WITH_WINDOWS=1 build-images.
To disable, use make WITH_WINDOWS=0 build-images.
List of Windows Server versions to build for. Defaults to ltsc2019 for Windows Server 2019.
See https://hub.docker.com/_/microsoft-windows-servercore for all available Windows versions.
Build ARM64 container images for Agones
This option is enabled by default via implicit make WITH_ARM64=1 build-images.
To disable, use make WITH_ARM64=0 build-images.
Which driver to use with a Minikube test cluster.
Defaults to "docker".
All targets will create the build image if it is not present.
Targets for developing with the build image.
Build all the images required for Agones, as well as the SDKs
Build all the images required for Agones
Build debug-enabled Docker images for all Agones services with Delve debugger support. These images include the Go debugger and expose debug ports for remote debugging.
Build all the sdks required for Agones
Next command make build-sdk SDK_FOLDER=[SDK_TYPE] will build SDK of SDK_TYPE.
For instance, in order to build the cpp sdk static and dynamic libraries (linux libraries only) use SDK_FOLDER=cpp
Next command make run-sdk-command COMMAND=[COMMAND] SDK_FOLDER=[SDK_TYPE] will execute command for SDK_TYPE.
For instance, in order to generate swagger codes when you change swagger.json definition, use make run-sdk-command COMMAND=gen SDK_FOLDER=restapi
Run Agones sidecar which would wait for all requests from the SDK client. Note that annotation should contain UID and label should contain CreationTimestamp values to pass the test.
Only run a conformance test for a specific Agones SDK.
Build, run and clean conformance test for a specific Agones SDK.
Run SDK conformance test. Run SDK server (sidecar) in test mode (which would record all GRPC requests) versus all SDK test clients which should generate those requests. All methods are verified.
Clean leftover binary and package files after running SDK conformance tests.
Run the go tests, the sdk tests, the website tests and yaml tests.
Run only the golang tests
Lint the Go code
Run make build for all examples subdirectories
Generate https://agones.dev website locally and host on http://localhost:1313
Check the links in a website
Check the links in a website, includes test-gen-api-docs target
Create all the site images from dot and puml diagrams in /site/static/diagrams
Generate Agones CRD reference documentation Agones CRD API reference. Set feature shortcode with proper version automatically
Verifies that there is no changes in generated Agones CRD API reference compared to the current one (useful for CI)
Pushes all built images up to the $(REGISTRY)
Installs the current development version of Agones into the Kubernetes cluster
Removes Agones from the Kubernetes cluster
Updates the Agones installation with the IP of the Allocation LoadBalancer, thereby creating a valid certificate for the Allocation gRPC endpoints.
The certificates are downloaded from the test kubernetes cluster and stored in ./build/allocation
Runs end-to-end tests on the previously installed version of Agones. These tests validate Agones flow from start to finish.
It uses the KUBECONFIG to target a Kubernetes cluster.
Use GAMESERVERS_NAMESPACE flag to provide a namespace or leave it empty in order to create and use a random one.
See make minikube-test-e2e to run end-to-end tests on Minikube.
Runs integration portion of the end-to-end tests.
Pass flags to go test command
using the ARGS parameter. For example, to run only the TestGameServerReserve test:
make test-e2e-integration ARGS='-run TestGameServerReserve'Run controller failure portion of the end-to-end tests.
Run allocator failure portion of the end-to-end test.
Install Prometheus server using Prometheus Community chart into the current cluster.
By default all exporters and alertmanager is disabled.
You can use this to collect Agones Metrics.
See make minikube-setup-prometheus and make kind-setup-prometheus to run the installation on Minikube or Kind.
Run helm repo update to get the mose recent charts.
Install Grafana server using grafana community chart into the current cluster and setup Agones dashboards with Prometheus datasource.
You can set your own password using the PASSWORD environment variable.
See make minikube-setup-grafana and make kind-setup-grafana to run the installation on Minikube or Kind.
Install Prometheus-stack using Prometheus Community chart into the current cluster.
By default only prometheus and grafana will installed, all exporters and alertmanager is disabled.
You can use this to collect Agones Metrics using ServiceMonitor.
See make minikube-setup-prometheus-stack and make kind-setup-prometheus-stack to run the installation on Minikube or Kind.
Sets up port forwarding to the Prometheus deployment (port 9090 Prometheus UI).
On Windows and MacOS you will need to have installed kubectl.
See make minikube-prometheus-portforward and make kind-prometheus-portforward to run on Minikube or Kind.
Sets up port forwarding to the grafana deployment (port 3000 UI).
On Windows and MacOS you will need to have installed kubectl.
See make minikube-grafana-portforward and make kind-grafana-portforward to run on Minikube or Kind.
Sets up port forwarding to a specified PORT var (defaults to 8080 for controller metrics) to the controller deployment.
Start the web interface for pprof for cpu profiling.
Start the web interface for pprof for heap profiling.
Run a bash shell with the developer tools (go tooling, kubectl, etc) and source code in it.
Run a container with pkgsite on port 8888
Compile the gameserver controller and then build the docker image
Compile the gameserver sidecar and then build the docker image
Compile the ping binary and then build the docker image
Generate the /install/yaml/install.yaml from the Helm template
Generate the embedded OpenAPI specs for existing Kubernetes Objects, such as PodTemplateSpec and ObjectMeta.
This should be run against a clean or brand new cluster, as external CRD's or schemas could cause errors to occur.
Generate the Custom Resource Definition client(s), conversions, deepcopy, and defaults code.
Generate the allocator gRPC code
Generate the SDK gRPC server and client code for all SDKs.
Generate the SDK gRPC server and client code for a single SDK (specified in the SDK_FOLDER variable).
Targets for building the build image
Cleans the kubernetes and gcloud configurations
Deletes the local build docker image
Creates the build docker image
A set of utilities for setting up a Kubernetes Engine cluster on Google Cloud Platform, since it's an easy way to get a test cluster working with Kubernetes.
Initialise the gcloud login and project configuration, if you are working with GCP.
Creates and authenticates a GKE cluster to work against.
Delete a GKE cluster previously created with make gcloud-test-cluster.
Pulls down authentication information for kubectl against a cluster, name can be specified through CLUSTER_NAME (defaults to 'test-cluster').
Creates a short lived access to Google Cloud container repositories, so that you are able to call
docker push directly. Useful when used in combination with make push command.
Utilities for deploying a Kubernetes Engine cluster on Google Cloud Platform using google Terraform provider.
Create GKE cluster and install release version of agones. Run next command to create GKE cluster with agones (version from helm repository):
[GKE_PASSWORD="<YOUR_PASSWORD>"] make gcloud-terraform-cluster
Where <YOUR_PASSWORD> should be at least 16 characters in length. You can omit GKE_PASSWORD and then basic auth would be disabled. Also you change ports="7000-8000" setting using tfvars file.
Also you can define password password=<YOUR_PASSWORD> string in build/terraform.tfvars.
Change AGONES_VERSION to a specific version you want to install.
Create GKE cluster and install current version of agones.
The current version should be built and pushed to $(REGISTRY) beforehand:
make build-images
make push
Run terraform destroy on your cluster.
Remove .terraform directory with configs as well as tfstate files.
A set of utilities for setting up and running a Minikube instance, for local development.
Since Minikube runs locally, there are some targets that need to be used instead of the standard ones above.
Switches to an "agones" profile, and starts a kubernetes cluster of the right version. Uses "docker" as the default driver.
If needed, use MINIKUBE_DRIVER variable to change the VM driver.
Installs the current development version of Agones into the Kubernetes cluster.
Use this instead of make install, as it disables PullAlways on the install.yaml
Push the local Agones Docker images that have already been built
via make build or make build-images into the "agones" minikube instance with minikube cache add
Installs prometheus metric backend into the Kubernetes cluster.
Use this instead of make setup-prometheus, as it disables Persistent Volume Claim.
Installs grafana into the Kubernetes cluster.
Use this instead of make setup-grafana, as it disables Persistent Volume Claim.
Installs prometheus-stack into the Kubernetes cluster.
Use this instead of make setup-prometheus-stack, as it disables Persistent Volume Claim.
The minikube version of make prometheus-portforward to setup
port forwarding to the prometheus deployment.
The minikube version of make grafana-portforward to setup
port forwarding to the grafana deployment.
Runs end-to-end tests on the previously installed version of Agones. These tests validate Agones flow from start to finish.
⚠ Running all the e2e tests can often overwhelm a local minikube cluster, so use at your own risk. You should look at Running Individual End-to-End Tests to run tests on a case by case basis.
Connecting to Minikube requires so enhanced permissions, so use this target
instead of make shell to start an interactive shell for development on Minikube.
The minikube version of make controller-portforward to setup
port forwarding to the controller deployment.
Install Agones in debug mode with all services set to 1 replica and debug images. This target is specifically designed for debugging workflows with proper debug configuration.
Start port forwarding for all Agones services to enable remote debugging. Sets up the following port forwards:
- Controller: localhost:2346 -> agones-controller:2346
- Extensions: localhost:2347 -> agones-extensions:2346
- Ping: localhost:2348 -> agones-ping:2346
- Allocator: localhost:2349 -> agones-allocator:2346
- Processor: localhost:2350 -> agones-processor:2346
Use environment variables to customize ports (see Development Workflow Guide).
Start port forwarding for debugging the Agones SDK sidecar in game server pods. Provides interactive mode to select from available game server pods or specify a pod directly. Forwards local port 2351 to the debug port 2346 in the selected pod.
Kind - kubernetes in docker is a tool for running local Kubernetes clusters using Docker container "nodes".
Since Kind runs locally, there are some targets that need to be used instead of the standard ones above.
Starts a local kubernetes cluster, you can delete it with make kind-delete-cluster
Use KIND_PROFILE variable to change the name of the cluster.
Push the local Agones Docker images that have already been built
via make build or make build-images into the "agones" Kind cluster.
Installs the current development version of Agones into the Kubernetes cluster.
Use this instead of make install, as it disables PullAlways on the install.yaml
Installs prometheus metric backend into the Kubernetes cluster.
Use this instead of make setup-prometheus, as it disables Persistent Volume Claim.
Installs grafana into the Kubernetes cluster.
Use this instead of make setup-grafana, as it disables Persistent Volume Claim.
Installs prometheus-stack into the Kubernetes cluster.
Use this instead of make setup-prometheus-stack, as it disables Persistent Volume Claim.
The kind version of make prometheus-portforward to setup
port forwarding to the prometheus deployment.
The kind version of make grafana-portforward to setup
port forwarding to the grafana deployment.
Runs end-to-end tests on the previously installed version of Agones. These tests validate Agones flow from start to finish.
Connecting to Kind requires so enhanced permissions, so use this target
instead of make shell to start an interactive shell for development on Kind.
The Kind version of make controller-portforward to setup
port forwarding to the controller deployment.
- See Building and Testing Guide for basic build workflows
- See Cluster Setup Guide for setting up clusters to use these targets
- See Development Workflow Guide for advanced development patterns