Skip to content

Commit

Permalink
refactor simple game server (#3817)
Browse files Browse the repository at this point in the history
* refactor simple game server
* added the suggested changes
* updated the version and added the sugested change
* final refactored code
  • Loading branch information
ashutosji authored Jun 25, 2024
1 parent 56337c8 commit d8689db
Show file tree
Hide file tree
Showing 25 changed files with 637 additions and 590 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.32
GS_TEST_IMAGE ?= us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33

# 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 examples/crd-client/create-gs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ spec:
imagePullPolicy: Always
env:
- name: GAMESERVER_IMAGE
value: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.32
value: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
restartPolicy: Never
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.32
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
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.32
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
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.windows
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ COPY . agones.dev/agones

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 main.go
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}
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-game-server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ WITH_ARM64 ?= 1

mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
project_path := $(dir $(mkfile_path))
version := 0.32
version := 0.33
ifeq ($(REPOSITORY),)
server_tag := simple-game-server:$(version)
else
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.32
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
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.32
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
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.32
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
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.32
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
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.28
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
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.32
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
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.32
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
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.32
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.33
resources:
requests:
memory: 64Mi
Expand Down
Loading

0 comments on commit d8689db

Please sign in to comment.