-
Notifications
You must be signed in to change notification settings - Fork 47
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
adding logrus to initcontainer #50
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
# GameServerBuild definition | ||
A GameServerBuild is equivalent to a Build region in MPS. GameServer containers that work in thundernetes should work in a similar way on PlayFab Multiplayer Servers service. | ||
Here you can see the YAML that can be used to create a GameServerBuild in thundernetes. Fields are similar to the ones used on MPS. | ||
```yaml | ||
apiVersion: mps.playfab.com/v1alpha1 | ||
kind: GameServerBuild | ||
metadata: | ||
name: gameserverbuild-sample # required, name of the GameServerBuild | ||
spec: | ||
titleID: "1E03" # required, corresponds to the PlayFab TitleID your game server is using. Can be an arbitrary string | ||
buildID: "85ffe8da-c82f-4035-86c5-9d2b5f42d6f5" # required, build ID of your game, must be GUID. Will be used for allocations | ||
standingBy: 2 # required, number of standing by servers to create | ||
max: 4 # reqired, max number of servers to create. Active+StandingBy servers will never be larger than max | ||
crashesToMarkUnhealthy: 5 # optional, default is 5. It is the number of crashes needed to mark the GameServerBuild unhealthy. Once this happens, no other operation will take place | ||
buildMetadata: # optional. Retrievable via GSDK, used to customize your game server | ||
- key: "buildMetadataKey1" | ||
value: "buildMetadataValue1" | ||
- key: "buildMetadataKey1" | ||
value: "buildMetadataValue1" | ||
portsToExpose: # port names that you need to expose for your game server, read more below | ||
- containerName: gameserver-sample # name of the container that you want its port exposed | ||
portName: gameport # name of the port that you want to expose | ||
podSpec: | ||
containers: | ||
- image: youGameServerImage:tag # image of your game server | ||
name: gameserver-sample # name of the container. Must be the same as portsToExpose.containerName | ||
ports: | ||
- containerPort: 7777 # port that you want to expose | ||
name: gameport # name of the port that you want to expose. Must be the same as portsToExpose.portName | ||
``` | ||
The podSpec contains the definition for a [Kubernetes Pod](https://kubernetes.io/docs/concepts/workloads/pods/). As a result, you should include here whatever is needed for your game server (environment variables, storage, etc). Bear in mind though that not everything will work in MPS though. | ||
## PortsToExpose | ||
This is a list of containerName/portName tuples: These are the ports that you want to be exposed in the [Worker Node/VM](https://kubernetes.io/docs/concepts/architecture/nodes/) when the Pod is created. The way this works is that each Pod you create will have >=1 number of containers. There, each container will have its own *Ports* definition. If a port in this definition is included in the *portsToExpose* array, this port will be publicly exposed in the Node/VM. This is accomplished by the creation of a **hostPort** value for each of the container ports you want to expose. The reason we need this is that because i) you may want to use some ports on your Pod containers for other purposed than players connecting to it and ii) a portName must be unique within a container. Ports assigned are in the port range 10000-50000. | ||
# GameServerBuild definition | ||
|
||
A GameServerBuild is equivalent to a Build region in MPS. GameServer containers that work in thundernetes should work in a similar way on PlayFab Multiplayer Servers service. | ||
|
||
Here you can see the YAML that can be used to create a GameServerBuild in thundernetes. Fields are similar to the ones used on MPS. | ||
|
||
```yaml | ||
apiVersion: mps.playfab.com/v1alpha1 | ||
kind: GameServerBuild | ||
metadata: | ||
name: gameserverbuild-sample # required, name of the GameServerBuild | ||
spec: | ||
titleID: "1E03" # required, corresponds to the PlayFab TitleID your game server is using. Can be an arbitrary string | ||
buildID: "85ffe8da-c82f-4035-86c5-9d2b5f42d6f5" # required, build ID of your game, must be GUID. Will be used for allocations | ||
standingBy: 2 # required, number of standing by servers to create | ||
max: 4 # reqired, max number of servers to create. Active+StandingBy servers will never be larger than max | ||
crashesToMarkUnhealthy: 5 # optional, default is 5. It is the number of crashes needed to mark the GameServerBuild unhealthy. Once this happens, no other operation will take place | ||
buildMetadata: # optional. Retrievable via GSDK, used to customize your game server | ||
- key: "buildMetadataKey1" | ||
value: "buildMetadataValue1" | ||
- key: "buildMetadataKey1" | ||
value: "buildMetadataValue1" | ||
portsToExpose: # port names that you need to expose for your game server, read more below | ||
- containerName: gameserver-sample # name of the container that you want its port exposed | ||
portName: gameport # name of the port that you want to expose | ||
podSpec: | ||
containers: | ||
- image: youGameServerImage:tag # image of your game server | ||
name: gameserver-sample # name of the container. Must be the same as portsToExpose.containerName | ||
ports: | ||
- containerPort: 7777 # port that you want to expose | ||
name: gameport # name of the port that you want to expose. Must be the same as portsToExpose.portName | ||
``` | ||
|
||
The podSpec contains the definition for a [Kubernetes Pod](https://kubernetes.io/docs/concepts/workloads/pods/). As a result, you should include here whatever is needed for your game server (environment variables, storage, etc). Bear in mind though that not everything will work in MPS though. | ||
|
||
## PortsToExpose | ||
|
||
This is a list of containerName/portName tuples: These are the ports that you want to be exposed in the [Worker Node/VM](https://kubernetes.io/docs/concepts/architecture/nodes/) when the Pod is created. The way this works is that each Pod you create will have >=1 number of containers. There, each container will have its own *Ports* definition. If a port in this definition is included in the *portsToExpose* array, this port will be publicly exposed in the Node/VM. This is accomplished by the creation of a **hostPort** value for each of the container ports you want to expose. The reason we need this is that because i) you may want to use some ports on your Pod containers for other purposed than players connecting to it and ii) a portName must be unique within a container. Ports assigned are in the port range 10000-50000. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= | ||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | ||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | ||
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= | ||
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= | ||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= | ||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4= | ||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CRLF vs LF again, sorry :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always LF :) CRLF takes up twice the space :)