diff --git a/charts/stable/minecraft-router/Chart.yaml b/charts/stable/minecraft-router/Chart.yaml index 483f1a0b211..6a0fa18c9b7 100644 --- a/charts/stable/minecraft-router/Chart.yaml +++ b/charts/stable/minecraft-router/Chart.yaml @@ -37,5 +37,4 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/minecraft-router - https://hub.docker.com/r/itzg/mc-router type: application -version: 2.4.1 - +version: 2.5.0 diff --git a/charts/stable/minecraft-router/docs/how-to.md b/charts/stable/minecraft-router/docs/how-to.md index c5eab589506..9c1fda2b063 100644 --- a/charts/stable/minecraft-router/docs/how-to.md +++ b/charts/stable/minecraft-router/docs/how-to.md @@ -10,6 +10,8 @@ Default server can be given in the case an unknown URL is detected. More information about linking charts and Cluster Internal Domain can be found in the common documentation. Example deployment, used with Cluster Internal Domain names: +## Manual Discovery + ```yaml mcrouter: default: minecraft-java.minecraft-java.svc.cluster.local:25565 @@ -18,3 +20,18 @@ mcrouter: - ${SERVER2_URL}=truecharts-mcserver-minecraft-java.truecharts-mcserver.svc.cluster.local:25565 - ${SERVER3_URL}=kidsplayground-server-minecraft-java.kidsplayground-server.svc.cluster.local:25565 ```` + +## Automatic Discovery + +You can add the following annotations to your minecraft-java instances like so for the main service to be auto discovered by minecraft-router. + +```yaml +service: + main: + enabled: true + annotations: + # only 1 service should have this enabled + mc-router.itzg.me/defaultServer: "true" + # the domain that users will connect to! + mc-router.itzg.me/externalServerName: "external.host.domain" +``` diff --git a/charts/stable/minecraft-router/values.yaml b/charts/stable/minecraft-router/values.yaml index a680a66888d..dd97a5faa96 100644 --- a/charts/stable/minecraft-router/values.yaml +++ b/charts/stable/minecraft-router/values.yaml @@ -14,11 +14,13 @@ service: enabled: true port: 25564 +# manual option mcrouter: - default: vanilla:25565 - mappings: - - vanilla:25565 - - forge:25565 + # vanilla:25565 + default: "" + mappings: [] + # - vanilla:25565 + # - forge:25565 workload: main: @@ -44,5 +46,30 @@ workload: env: API_BINDING: ":{{ .Values.service.api.ports.api.port }}" PORT: "{{ .Values.service.main.ports.main.port }}" + # enabled for auto discovery to work + IN_KUBE_CLUSTER: true + # leave blank for all namespaces + # KUBE_NAMESPACE: "" DEFAULT: "{{ .Values.mcrouter.default }}" MAPPING: '{{ join "," .Values.mcrouter.mappings }}' + +rbac: + main: + enabled: true + primary: true + clusterWide: true + rules: + - apiGroups: [""] + resources: + - "services" + verbs: + - "list" + - "watch" + +serviceAccount: + main: + enabled: true + primary: true + +podOptions: + automountServiceAccountToken: true