Skip to content

Commit

Permalink
Merge branch 'main' into add-gamenetcode-resource-to-agones-documenta…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
aallbrig authored Jul 16, 2024
2 parents bb84ab1 + a4576c6 commit 0362002
Show file tree
Hide file tree
Showing 59 changed files with 121 additions and 82 deletions.
2 changes: 1 addition & 1 deletion build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ KIND_PROFILE ?= agones
KIND_CONTAINER_NAME=$(KIND_PROFILE)-control-plane

# Game Server image to use while doing end-to-end tests
GS_TEST_IMAGE ?= us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
GS_TEST_IMAGE ?= us-docker.pkg.dev/agones-images/examples/simple-game-server:0.34

# Enable all beta feature gates. Keep in sync with `true` (beta) entries in pkg/util/runtime/features.go:featureDefaults
BETA_FEATURE_GATES ?= "CountsAndLists=true&DisableResyncOnSDKServer=true"
Expand Down
2 changes: 1 addition & 1 deletion build/build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN gem install fpm && \

# install go
WORKDIR /usr/local
ENV GO_VERSION=1.21.6
ENV GO_VERSION=1.21.12
ENV GOPATH /go
ENV GO111MODULE=on
RUN wget -q https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz && \
Expand Down
2 changes: 1 addition & 1 deletion build/build-sdk-images/go/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN apt-get --allow-releaseinfo-change update && \

# install go
WORKDIR /usr/local
ENV GO_VERSION=1.21.6
ENV GO_VERSION=1.21.12
ENV GO111MODULE=on
ENV GOPATH /go
RUN wget -q https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz && \
Expand Down
2 changes: 1 addition & 1 deletion build/build-sdk-images/restapi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN apt-get --allow-releaseinfo-change update && \

# install go
WORKDIR /usr/local
ENV GO_VERSION=1.21.6
ENV GO_VERSION=1.21.12
ENV GO111MODULE=on
ENV GOPATH /go
RUN wget -q https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz && \
Expand Down
2 changes: 1 addition & 1 deletion build/e2e-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get update && \

# install go
WORKDIR /usr/local
ENV GO_VERSION=1.21.6
ENV GO_VERSION=1.21.12
ENV GOPATH /go
ENV GO111MODULE=on
RUN wget -q https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz && \
Expand Down
2 changes: 1 addition & 1 deletion build/report/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ steps:
id: build-report
script: |
#!/usr/bin/env bash
export GO_VERSION=1.21.6
export GO_VERSION=1.21.12
cd /usr/local
curl -SsL https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz | tar -xzf-
export PATH=/usr/local/go/bin:${PATH}
Expand Down
2 changes: 1 addition & 1 deletion examples/allocation-endpoint/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ PROD_REPO ?= us-docker.pkg.dev/agones-images/examples
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
project_path := $(dir $(mkfile_path))
root_path = $(realpath $(project_path)/../..)
version := 0.8
version := 0.9
ifeq ($(REPOSITORY),)
server_tag := allocation-endpoint-proxy:$(version)
else
Expand Down
2 changes: 1 addition & 1 deletion examples/allocation-endpoint/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# syntax=docker/dockerfile:1

FROM golang:1.20-alpine
FROM golang:1.21-alpine

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion examples/allocation-endpoint/terraform/variable.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variable "project_id" {
variable "ae_proxy_image" {
type = string
description = "The docker image of the allocation proxy."
default = "us-docker.pkg.dev/agones-images/examples/allocation-endpoint-proxy:0.8"
default = "us-docker.pkg.dev/agones-images/examples/allocation-endpoint-proxy:0.9"
}

variable "region" {
Expand Down
2 changes: 1 addition & 1 deletion examples/autoscaler-webhook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

# Gather dependencies and build the executable
FROM golang:1.21.6 as builder
FROM golang:1.21.12 as builder
WORKDIR /go/src
COPY . agones.dev/agones

Expand Down
2 changes: 1 addition & 1 deletion examples/autoscaler-webhook/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ PROD_REPO ?= us-docker.pkg.dev/agones-images/examples
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
project_path := $(dir $(mkfile_path))
root_path := $(realpath $(project_path)/../..)
version := 0.13
version := 0.14
ifeq ($(REPOSITORY),)
autoscaler_webhook_tag := autoscaler-webhook:$(version)
else
Expand Down
2 changes: 1 addition & 1 deletion examples/autoscaler-webhook/autoscaler-service-tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
secretName: autoscalersecret
containers:
- name: autoscaler-webhook
image: us-docker.pkg.dev/agones-images/examples/autoscaler-webhook:0.13
image: us-docker.pkg.dev/agones-images/examples/autoscaler-webhook:0.14
imagePullPolicy: Always
volumeMounts:
- mountPath: /home/service/certs
Expand Down
2 changes: 1 addition & 1 deletion examples/autoscaler-webhook/autoscaler-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
# serviceAccount: autoscaler-webhook
containers:
- name: autoscaler-webhook
image: us-docker.pkg.dev/agones-images/examples/autoscaler-webhook:0.13
image: us-docker.pkg.dev/agones-images/examples/autoscaler-webhook:0.14
imagePullPolicy: Always
ports:
- name: autoscaler
Expand Down
2 changes: 1 addition & 1 deletion examples/crd-client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

# Gather dependencies and build the executable
FROM golang:1.21.6 as builder
FROM golang:1.21.12 as builder
WORKDIR /go/src/crd-client
COPY . .

Expand Down
2 changes: 1 addition & 1 deletion examples/crd-client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

REPOSITORY ?=
PROD_REPO ?= us-docker.pkg.dev/agones-images/examples
version := 0.16
version := 0.17
ifeq ($(REPOSITORY),)
server_tag := crd-client:$(version)
else
Expand Down
4 changes: 2 additions & 2 deletions examples/crd-client/create-gs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ spec:
cpu: 500m
ephemeral-storage: 1Gi
memory: 2Gi
image: us-docker.pkg.dev/agones-images/examples/crd-client:0.16
image: us-docker.pkg.dev/agones-images/examples/crd-client:0.17
imagePullPolicy: Always
env:
- name: GAMESERVER_IMAGE
value: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
value: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.34
restartPolicy: Never
2 changes: 1 addition & 1 deletion examples/custom-controller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

# Gather dependencies and build the executable
FROM golang:1.21.6 as builder
FROM golang:1.21.12 as builder
WORKDIR /go/src/custom-controller
COPY . .

Expand Down
2 changes: 1 addition & 1 deletion examples/custom-controller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

REPOSITORY ?=
PROD_REPO ?= us-docker.pkg.dev/agones-images/examples
version := 0.4
version := 0.5
ifeq ($(REPOSITORY),)
server_tag := custom-controller:$(version)
else
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-controller/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@ spec:
serviceAccountName: custom-controller-sa
containers:
- name: custom-controller
image: us-docker.pkg.dev/agones-images/examples/custom-controller:0.4
image: us-docker.pkg.dev/agones-images/examples/custom-controller:0.5
imagePullPolicy: Always
2 changes: 1 addition & 1 deletion examples/fleet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ spec:
spec:
containers:
- name: simple-game-server
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.34
2 changes: 1 addition & 1 deletion examples/gameserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ spec:
spec:
containers:
- name: simple-game-server
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.34
imagePullPolicy: Always
# nodeSelector is a label that can be used to tell Kubernetes which host
# OS to use. For Windows game servers uncomment the nodeSelector
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-game-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

# build
FROM golang:1.21.6 as builder
FROM golang:1.21.12 as builder
WORKDIR /go/src
COPY . agones.dev/agones

Expand Down
5 changes: 2 additions & 3 deletions examples/simple-game-server/Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@

# Build Stage
ARG WINDOWS_VERSION=ltsc2019
ARG IMAGE_TAG=""

FROM --platform=linux/amd64 golang:1.21.6 as builder
FROM --platform=linux/amd64 golang:1.21.12 as builder
WORKDIR /go/src
COPY . agones.dev/agones

Expand All @@ -30,7 +29,7 @@ WORKDIR /go/src/agones.dev/agones/examples/simple-game-server
RUN GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o simple-game-server.exe *.go

RUN ls -ltr /go/src/agones.dev/agones/examples/simple-game-server
FROM mcr.microsoft.com/windows/servercore:${WINDOWS_VERSION}${IMAGE_TAG}
FROM mcr.microsoft.com/windows/servercore:${WINDOWS_VERSION}

WORKDIR /

Expand Down
7 changes: 2 additions & 5 deletions examples/simple-game-server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ BUILDX_WINDOWS_BUILDER = windows-builder
# GKE-Windows version map: https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster-windows#version_mapping
WINDOWS_VERSIONS = ltsc2019 ltsc2022

# https://github.com/microsoft/Windows-Containers/issues/493: Pin the LTSC2019 image to an older sha
LTSC2019_IMAGE_TAG = "@sha256:6fdf140282a2f809dae9b13fe441635867f0a27c33a438771673b8da8f3348a4"

WINDOWS_DOCKER_PUSH_ARGS = # When pushing set to --push.
# Build with Windows support
WITH_WINDOWS ?= 1
Expand All @@ -42,7 +39,7 @@ WITH_ARM64 ?= 1

mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
project_path := $(dir $(mkfile_path))
version := 0.33
version := 0.34
ifeq ($(REPOSITORY),)
server_tag := simple-game-server:$(version)
else
Expand Down Expand Up @@ -112,7 +109,7 @@ push-windows-image-%:
build-windows-image-%: ensure-windows-buildx
cd $(root_path) && DOCKER_CLI_EXPERIMENTAL=enabled \
docker buildx build --platform windows/amd64 --builder $(BUILDX_WINDOWS_BUILDER) -f $(project_path)Dockerfile.windows \
--tag=$(server_tag)-windows_amd64-$* --build-arg WINDOWS_VERSION=$* --build-arg IMAGE_TAG=$(if $(filter ltsc2019,$*),$(LTSC2019_IMAGE_TAG),) . $(WINDOWS_DOCKER_PUSH_ARGS)
--tag=$(server_tag)-windows_amd64-$* --build-arg WINDOWS_VERSION=$* . $(WINDOWS_DOCKER_PUSH_ARGS)

ensure-windows-buildx:
# Windows image builds must be directed to a specific buildx context.
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-game-server/dev-gameserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ spec:
spec:
containers:
- name: simple-game-server
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.34
2 changes: 1 addition & 1 deletion examples/simple-game-server/fleet-distributed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
spec:
containers:
- name: simple-game-server
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.34
resources:
requests:
memory: 64Mi
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-game-server/fleet-tcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
spec:
containers:
- name: simple-game-server
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.34
env:
# Disables the UDP listener (Enabled by default)
- name: UDP
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-game-server/fleet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
spec:
containers:
- name: simple-game-server
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.34
resources:
requests:
memory: 64Mi
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-game-server/gameserver-none.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
spec:
containers:
- name: simple-game-server
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.34
resources:
requests:
memory: 64Mi
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-game-server/gameserver-passthrough.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
spec:
containers:
- name: simple-game-server
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.34
env:
- name: PASSTHROUGH
value: 'TRUE'
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-game-server/gameserver-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
spec:
containers:
- name: simple-game-server
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.34
resources:
requests:
memory: 64Mi
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-game-server/gameserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
spec:
containers:
- name: simple-game-server
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.34
resources:
requests:
memory: 64Mi
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-genai-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

# build
FROM golang:1.21.6 as builder
FROM golang:1.21.12 as builder
WORKDIR /go/src
COPY . agones.dev/agones

Expand Down
26 changes: 21 additions & 5 deletions examples/simple-genai-server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,31 @@
# \ V / (_| | | | | (_| | |_) | | __\__ \
# \_/ \__,_|_| |_|\__,_|_.__/|_|\___|___/
#
REPOSITORY ?= us-docker.pkg.dev/agones-images/examples
REPOSITORY ?=
PROD_REPO ?= us-docker.pkg.dev/agones-images/examples

mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
project_path := $(dir $(mkfile_path))
version := 0.2
server_tag := $(REPOSITORY)/simple-genai-game-server:$(version)
version := 0.3
ifeq ($(REPOSITORY),)
server_tag := simple-genai-game-server:$(version)
else
server_tag := $(REPOSITORY)/simple-genai-game-server:$(version)
endif
server_tag_linux_amd64 = $(server_tag)-linux-amd64
push_server_manifest = $(server_tag_linux_amd64)
root_path = $(realpath $(project_path)/../..)

# _____ _
# |_ _|_ _ _ __ __ _ ___| |_ ___
# | |/ _` | '__/ _` |/ _ \ __/ __|
# | | (_| | | | (_| | __/ |_\__ \
# |_|\__,_|_| \__, |\___|\__|___/
# |___/

build: build-linux-image-amd64
push: push-linux-image-amd64
# Docker >=24.0.6
# Docker >=24.0.6
docker buildx imagetools create --tag $(server_tag) \
$(push_server_manifest)

Expand All @@ -47,10 +59,14 @@ push-linux-image-amd64: build

# check if hosted on Google Artifact Registry
gar-check:
gcloud container images describe $(server_tag)
gcloud container images describe $(PROD_REPO)/$(server_tag)

print-vars:
$(info project_path is $(project_path))
$(info server_tag is $(server_tag))
$(info server_tag_linux_amd64 is $(server_tag_linux_amd64))
$(info push_server_manifest is $(push_server_manifest))

# build and push the simple-genai-server image with specified tag
cloud-build:
cd $(root_path) && gcloud builds submit --config=./examples/simple-genai-server/cloudbuild.yaml
Loading

0 comments on commit 0362002

Please sign in to comment.