Skip to content

Commit

Permalink
Docs: Centralise udp-server tag (#869)
Browse files Browse the repository at this point in the history
Whenever the udp-server example gets updated, it results in a big
find and replace operation. We can't get rid of that entirely,
but we can fix it for the website and docs.
  • Loading branch information
markmandel authored Jul 5, 2019
1 parent 231520e commit f64963d
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 12 deletions.
3 changes: 3 additions & 0 deletions site/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ release_branch = "release-0.11.0"
# the main version. Never is rc.
release_version = "0.11.0"

# example tag
example_image_tag = "gcr.io/agones-images/udp-server:0.11"

# User interface configuration
[params.ui]
# Enable to show the side bar menu in its compact state.
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 @@ -38,7 +38,7 @@ spec:
spec:
containers:
- name: simple-udp
image: gcr.io/agones-images/udp-server:0.11
image: {{% example-image %}}
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 @@ -80,7 +80,7 @@ spec:
spec:
containers:
- name: simple-udp
image: gcr.io/agones-images/udp-server:0.11
image: {{% example-image %}}
```
This is the *default* Fleet scheduling strategy. It is designed for dynamic Kubernetes environments, wherein you wish
Expand Down Expand Up @@ -135,7 +135,7 @@ spec:
spec:
containers:
- name: simple-udp
image: gcr.io/agones-images/udp-server:0.11
image: {{% example-image %}}
```

This Fleet scheduling strategy is designed for static Kubernetes environments, such as when you are running Kubernetes
Expand Down
2 changes: 1 addition & 1 deletion site/content/en/docs/Advanced/service-accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
serviceAccountName: my-special-service-account # a custom service account
containers:
- name: simple-udp
image: gcr.io/agones-images/udp-server:0.11
image: {{% example-image %}}
```
If a service account is configured, the mounted key is not overwritten, as it assumed that you want to have full control
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.11
Image: {{< example-image >}}
Name: simple-udp
Resources:
Status:
Expand Down Expand Up @@ -308,7 +308,7 @@ status:
creationTimestamp: null
spec:
containers:
- image: gcr.io/agones-images/udp-server:0.11
- image: {{< example-image >}}
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.11
Image: {{< example-image >}}
Name: simple-udp
Resources:
Limits:
Expand Down
10 changes: 5 additions & 5 deletions site/content/en/docs/Guides/access-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,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.11"}},
Containers: []corev1.Container{{Name: "udp-server", Image: "{{% example-image %}}"}},
},
},
},
Expand Down Expand Up @@ -168,7 +168,7 @@ $ curl http://localhost:8001/apis/stable.agones.dev/v1alpha1
]
}

# list all gameservers in the default namesace
# list all gameservers in the default namespace
$ curl http://localhost:8001/apis/stable.agones.dev/v1alpha1/namespaces/default/gameservers
{
"apiVersion": "stable.agones.dev/v1alpha1",
Expand All @@ -178,7 +178,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.11\",\"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\":\"{{% example-image %}}\",\"name\":\"simple-udp\"}]}}}}\n"
},
"clusterName": "",
"creationTimestamp": "2018-03-02T21:41:05Z",
Expand Down Expand Up @@ -210,7 +210,7 @@ $ curl http://localhost:8001/apis/stable.agones.dev/v1alpha1/namespaces/default/
"spec": {
"containers": [
{
"image": "gcr.io/agones-images/udp-server:0.11",
"image": "{{% example-image %}}",
"name": "simple-udp",
"resources": {}
}
Expand Down Expand Up @@ -356,7 +356,7 @@ $ curl -d '{"apiVersion":"stable.agones.dev/v1alpha1","kind":"FleetAllocation","
"spec": {
"containers": [
{
"image": "gcr.io/agones-images/udp-server:0.11",
"image": "{{% example-image %}}",
"name": "simple-udp",
"resources": {}
}
Expand Down
1 change: 1 addition & 0 deletions site/layouts/shortcodes/example-image.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- $.Page.Site.Params.example_image_tag }}

0 comments on commit f64963d

Please sign in to comment.