Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix setAnnotation for simple-udp to use customized key & value #576

Merged
merged 4 commits into from
Feb 12, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ KIND_PROFILE ?= agones
KIND_CONTAINER_NAME=kind-$(KIND_PROFILE)-control-plane

# Game Server image to use while doing end-to-end tests
GS_TEST_IMAGE ?= gcr.io/agones-images/udp-server:0.6
GS_TEST_IMAGE ?= gcr.io/agones-images/udp-server:0.7

# Directory that this Makefile is in.
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
Expand Down
2 changes: 1 addition & 1 deletion examples/fleet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ spec:
spec:
containers:
- name: simple-udp
image: gcr.io/agones-images/udp-server:0.6
image: gcr.io/agones-images/udp-server:0.7
2 changes: 1 addition & 1 deletion examples/simple-udp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ REPOSITORY = gcr.io/agones-images

mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
project_path := $(dir $(mkfile_path))
server_tag = $(REPOSITORY)/udp-server:0.6
server_tag = $(REPOSITORY)/udp-server:0.7
root_path = $(realpath $(project_path)/../..)

# _____ _
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-udp/fleet-distributed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
spec:
containers:
- name: simple-udp
image: gcr.io/agones-images/udp-server:0.6
image: gcr.io/agones-images/udp-server:0.7
resources:
requests:
memory: "32Mi"
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-udp/fleet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
spec:
containers:
- name: simple-udp
image: gcr.io/agones-images/udp-server:0.6
image: gcr.io/agones-images/udp-server:0.7
resources:
requests:
memory: "64Mi"
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-udp/gameserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
spec:
containers:
- name: simple-udp
image: gcr.io/agones-images/udp-server:0.6
image: gcr.io/agones-images/udp-server:0.7
resources:
requests:
memory: "32Mi"
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-udp/gameserverset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ spec:
spec:
containers:
- name: simple-udp
image: gcr.io/agones-images/udp-server:0.6
image: gcr.io/agones-images/udp-server:0.7
4 changes: 2 additions & 2 deletions examples/simple-udp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ func watchGameServerEvents(s *sdk.SDK) {
}

// setAnnotation sets a given annotation
func setAnnotation(s *sdk.SDK, key string, value string) {
func setAnnotation(s *sdk.SDK, key, value string) {
log.Printf("Setting annotation %v=%v", key, value)
err := s.SetAnnotation("timestamp", time.Now().UTC().String())
err := s.SetAnnotation(key, value)
if err != nil {
log.Fatalf("could not set annotation: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion install/helm/agones/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
spec:
containers:
- name: simple-udp
image: gcr.io/agones-images/udp-server:0.6
image: gcr.io/agones-images/udp-server:0.7

Finally don't forget to explore our documentation and usage guides on how to develop and host dedicated game servers on top of Agones. :

Expand Down
2 changes: 1 addition & 1 deletion site/content/en/docs/Advanced/limiting-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
spec:
containers:
- name: simple-udp
image: gcr.io/agones-images/udp-server:0.6
image: gcr.io/agones-images/udp-server:0.7
resources:
limit:
cpu: "250m" #this is our limit here
Expand Down
4 changes: 2 additions & 2 deletions site/content/en/docs/Advanced/scheduling-and-autoscaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ spec:
spec:
containers:
- name: simple-udp
image: gcr.io/agones-images/udp-server:0.6
image: gcr.io/agones-images/udp-server:0.7
```

This is the *default* Fleet scheduling strategy. It is designed for dynamic Kubernetes environments, wherein you wish
Expand Down Expand Up @@ -134,7 +134,7 @@ spec:
spec:
containers:
- name: simple-udp
image: gcr.io/agones-images/udp-server:0.6
image: gcr.io/agones-images/udp-server:0.7
```

This Fleet scheduling strategy is designed for static Kubernetes environments, such as when you are running Kubernetes
Expand Down
4 changes: 2 additions & 2 deletions site/content/en/docs/Getting Started/create-fleet.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Spec:
Creation Timestamp: <nil>
Spec:
Containers:
Image: gcr.io/agones-images/udp-server:0.6
Image: gcr.io/agones-images/udp-server:0.7
Name: simple-udp
Resources:
Status:
Expand Down Expand Up @@ -326,7 +326,7 @@ status:
creationTimestamp: null
spec:
containers:
- image: gcr.io/agones-images/udp-server:0.6
- image: gcr.io/agones-images/udp-server:0.7
name: simple-udp
resources: {}
status:
Expand Down
2 changes: 1 addition & 1 deletion site/content/en/docs/Getting Started/create-gameserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Spec:
Creation Timestamp: <nil>
Spec:
Containers:
Image: gcr.io/agones-images/udp-server:0.6
Image: gcr.io/agones-images/udp-server:0.7
Name: simple-udp
Resources:
Status:
Expand Down
8 changes: 4 additions & 4 deletions site/content/en/docs/Guides/access-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func main() {
Spec: v1alpha1.GameServerSpec{
Template: corev1.PodTemplateSpec{
Spec: corev1.PodSpec{
Containers: []corev1.Container{{Name: "udp-server", Image: "gcr.io/agones-images/udp-server:0.6"}},
Containers: []corev1.Container{{Name: "udp-server", Image: "gcr.io/agones-images/udp-server:0.7"}},
},
},
},
Expand Down Expand Up @@ -176,7 +176,7 @@ $ curl http://localhost:8001/apis/stable.agones.dev/v1alpha1/namespaces/default/
"kind": "GameServer",
"metadata": {
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"stable.agones.dev/v1alpha1\",\"kind\":\"GameServer\",\"metadata\":{\"annotations\":{},\"name\":\"simple-udp\",\"namespace\":\"default\"},\"spec\":{\"containerPort\":7654,\"hostPort\":7777,\"portPolicy\":\"static\",\"template\":{\"spec\":{\"containers\":[{\"image\":\"gcr.io/agones-images/udp-server:0.6\",\"name\":\"simple-udp\"}]}}}}\n"
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"stable.agones.dev/v1alpha1\",\"kind\":\"GameServer\",\"metadata\":{\"annotations\":{},\"name\":\"simple-udp\",\"namespace\":\"default\"},\"spec\":{\"containerPort\":7654,\"hostPort\":7777,\"portPolicy\":\"static\",\"template\":{\"spec\":{\"containers\":[{\"image\":\"gcr.io/agones-images/udp-server:0.7\",\"name\":\"simple-udp\"}]}}}}\n"
},
"clusterName": "",
"creationTimestamp": "2018-03-02T21:41:05Z",
Expand Down Expand Up @@ -208,7 +208,7 @@ $ curl http://localhost:8001/apis/stable.agones.dev/v1alpha1/namespaces/default/
"spec": {
"containers": [
{
"image": "gcr.io/agones-images/udp-server:0.6",
"image": "gcr.io/agones-images/udp-server:0.7",
"name": "simple-udp",
"resources": {}
}
Expand Down Expand Up @@ -316,7 +316,7 @@ $ curl -d '{"apiVersion":"stable.agones.dev/v1alpha1","kind":"FleetAllocation","
"spec": {
"containers": [
{
"image": "gcr.io/agones-images/udp-server:0.6",
"image": "gcr.io/agones-images/udp-server:0.7",
"name": "simple-udp",
"resources": {}
}
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ func TestMain(m *testing.M) {
usr, _ := user.Current()
kubeconfig := flag.String("kubeconfig", filepath.Join(usr.HomeDir, "/.kube/config"),
"kube config path, e.g. $HOME/.kube/config")
gsimage := flag.String("gameserver-image", "gcr.io/agones-images/udp-server:0.6",
"gameserver image to use for those tests, gcr.io/agones-images/udp-server:0.6")
gsimage := flag.String("gameserver-image", "gcr.io/agones-images/udp-server:0.7",
"gameserver image to use for those tests, gcr.io/agones-images/udp-server:0.7")
pullSecret := flag.String("pullsecret", "",
"optional secret to be used for pulling the gameserver and/or Agones SDK sidecar images")

Expand Down