diff --git a/docs/src/latest/guide/recipes/overriding-pod-properties.md b/docs/src/latest/guide/recipes/overriding-pod-properties.md index eafff225..a636bd7e 100644 --- a/docs/src/latest/guide/recipes/overriding-pod-properties.md +++ b/docs/src/latest/guide/recipes/overriding-pod-properties.md @@ -13,7 +13,7 @@ You can find all the properties overridable by looking at the - [ProxyFleet](https://github.com/jeremylvln/Shulker/blob/main/packages/shulker-crds/src/v1alpha1/proxy_fleet.rs) - [MinecraftServerFleet](https://github.com/jeremylvln/Shulker/blob/main/packages/shulker-crds/src/v1alpha1/minecraft_server_fleet.rs) -## Add environment variables +## Adding environment variables Shulker already injects some environment variables that could be useful. But adding your own is fully supported: @@ -39,7 +39,7 @@ spec: ## Setting custom affinities -By default, Agones adds a \*_preferred_ scheduling on nodes +By default, Agones adds a _preferred_ scheduling on nodes labelled with `agones.dev/role=gameserver`. However you may want to customize more the scheduling behavior. @@ -73,3 +73,35 @@ spec: value: "my-server" // [!code focus] effect: "NoSchedule" // [!code focus] ``` + +## Mounting volumes + +Additional volumes can be injected to the `MinecraftServer`'s +created `Pod`: + +```yaml +apiVersion: shulkermc.io/v1alpha1 +kind: MinecraftServer +metadata: + name: my-server +spec: + clusterRef: + name: my-cluster + podOverrides: // [!code focus] + volumeMounts: // [!code focus] + - name: my_extra_volume // [!code focus] + mountPath: /mnt/path // [!code focus] + volumes: // [!code focus] + - name: my_extra_volume // [!code focus] + emptyDir: {} // [!code focus] +``` + +:::warning + +Agones, and thus Shulker, are not meant for data persistence but +rather ephemeral workload. While adding custom volumes to a `MinecraftServer` +is expected to work perfectly, adding some to a `MinecraftServerFleet` +will only work if your volume source support multiple mounts (it is +essentially the same as mounting the same volume to a `Deployment`). + +::: diff --git a/docs/src/latest/guide/recipes/using-custom-server-jar.md b/docs/src/latest/guide/recipes/using-custom-server-jar.md new file mode 100644 index 00000000..08fc99e3 --- /dev/null +++ b/docs/src/latest/guide/recipes/using-custom-server-jar.md @@ -0,0 +1,38 @@ +# Using custom server JAR + +You may want to use a custom server JAR to replace the default +behavior which is to download the matching version from the +channel. + +You have the ability to specify a resource reference to a custom +server JAR in the `MinecraftServer` and `MinecraftServerFleet` CRDs: + +```yaml +apiVersion: shulkermc.io/v1alpha1 +kind: MinecraftServerFleet +metadata: + name: my-server +spec: + clusterRef: + name: my-cluster + replicas: 1 + template: + spec: // [!code focus] + version: // [!code focus] + channel: Paper // [!code focus] + name: 1.20.0 // [!code focus] + customJar: // [!code focus] + url: https://example.com/custom-jar.jar // [!code focus] +``` + +:::warning + +While this feature allows you to customize the server software to run, +you can't use it to create servers with unsupported platforms. You +still have to specify the version channel so Shulker is aware of which +agent to inject into the server. + +You can, however, expect any standard fork of supported platforms to +work as long as they do not introduce breaking changes. + +::: diff --git a/docs/src/latest/sidebar.mts b/docs/src/latest/sidebar.mts index 52b8e646..b74f2780 100644 --- a/docs/src/latest/sidebar.mts +++ b/docs/src/latest/sidebar.mts @@ -48,6 +48,10 @@ export default [ text: 'Defining network administrators', link: link('/guide/recipes/defining-network-administrators'), }, + { + text: 'Using custom server JAR', + link: link('/guide/recipes/using-custom-server-jar'), + }, ], }, {