From 6fba59b39656a62ec3ceb0fabb950d0f355f919b Mon Sep 17 00:00:00 2001 From: Mark Mandel Date: Wed, 17 Mar 2021 13:33:33 -0700 Subject: [PATCH] Fix GameServerAllocation preferred documentation There was a bug in the reference docs that read that the `required` check was applied to all queries, including the preferred check. This is not the case - each label selector is independent. Fixing this in the documentation. --- .../en/docs/Reference/gameserverallocation.md | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/site/content/en/docs/Reference/gameserverallocation.md b/site/content/en/docs/Reference/gameserverallocation.md index dbb2d474d7..5d021e96e2 100644 --- a/site/content/en/docs/Reference/gameserverallocation.md +++ b/site/content/en/docs/Reference/gameserverallocation.md @@ -25,8 +25,10 @@ spec: game: my-game matchExpressions: - {key: tier, operator: In, values: [cache]} - # ordered list of preferred allocations out of the `required` set. + # An ordered list of preferred GameServer label selectors + # that are optional to be fulfilled, but will be searched before the `required` selector. # If the first selector is not matched, the selection attempts the second selector, and so on. + # If any of the preferred selectors are matched, the required selector is not considered. # This is useful for things like smoke testing of new game servers. # This also support `matchExpressions` preferred: @@ -55,13 +57,15 @@ name for the `GameServerAllocation` is generated when the `GameServerAllocation` The `spec` field is the actual `GameServerAllocation` specification and it is composed as follow: -- `required` is a [label selector](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - (matchLabels and/or matchExpressions) from which to choose GameServers from. - GameServers still have the hard requirement to be `Ready` to be allocated from -- `preferred` is an order list of [label selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) - out of the `required` set. - If the first selector is not matched, the selection attempts the second selector, and so on. - This is useful for things like smoke testing of new game servers. +- `required` is a [label selector](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) + (matchLabels and/or matchExpressions) from which to choose GameServers from. + GameServers still have the hard requirement to be `Ready` to be allocated from +- `preferred` is an ordered list of preferred + [label selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) + that are _optional_ to be fulfilled, but will be searched before the `required` selector. + If the first selector is not matched, the selection attempts the second selector, and so on. + If any of the `preferred` selectors are matched, the `required` selector is not considered. + This is useful for things like smoke testing of new game servers. - `scheduling` defines how GameServers are organised across the cluster, in this case specifically when allocating `GameServers` for usage. "Packed" (default) is aimed at dynamic Kubernetes clusters, such as cloud providers, wherein we want to bin pack