diff --git a/charts/incubator/mc-router/.helmignore b/charts/incubator/mc-router/.helmignore new file mode 100644 index 00000000000..77ca5567b26 --- /dev/null +++ b/charts/incubator/mc-router/.helmignore @@ -0,0 +1,30 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# OWNERS file for Kubernetes +OWNERS +# helm-docs templates +*.gotmpl +# docs folder +/docs +# icon +icon.png diff --git a/charts/incubator/mc-router/CHANGELOG.md b/charts/incubator/mc-router/CHANGELOG.md new file mode 100644 index 00000000000..825c32f0d03 --- /dev/null +++ b/charts/incubator/mc-router/CHANGELOG.md @@ -0,0 +1 @@ +# Changelog diff --git a/charts/incubator/mc-router/Chart.yaml b/charts/incubator/mc-router/Chart.yaml new file mode 100644 index 00000000000..08f67e2cc59 --- /dev/null +++ b/charts/incubator/mc-router/Chart.yaml @@ -0,0 +1,28 @@ +apiVersion: v2 +appVersion: "1.18.1" +dependencies: + - name: common + repository: https://library-charts.truecharts.org + version: 12.14.6 +deprecated: false +description: Routes Minecraft client connections to backend servers. +home: https://truecharts.org/charts/incubator/mc-router +icon: https://truecharts.org/img/hotlink-ok/chart-icons/mc-router.png +keywords: + - mc-router + - minecraft +kubeVersion: ">=1.16.0-0" +maintainers: + - email: info@truecharts.org + name: TrueCharts + url: https://truecharts.org +name: mc-router +sources: + - https://github.com/truecharts/charts/tree/master/charts/incubator/mc-router + - https://github.com/itzg/mc-router +type: application +version: 0.0.1 +annotations: + truecharts.org/catagories: | + - minecraft + truecharts.org/SCALE-support: "true" diff --git a/charts/incubator/mc-router/README.md b/charts/incubator/mc-router/README.md new file mode 100644 index 00000000000..7e59600739c --- /dev/null +++ b/charts/incubator/mc-router/README.md @@ -0,0 +1 @@ +# README diff --git a/charts/incubator/mc-router/icon.png b/charts/incubator/mc-router/icon.png new file mode 100644 index 00000000000..29339c9576b Binary files /dev/null and b/charts/incubator/mc-router/icon.png differ diff --git a/charts/incubator/mc-router/questions.yaml b/charts/incubator/mc-router/questions.yaml new file mode 100644 index 00000000000..ca80d16f7d1 --- /dev/null +++ b/charts/incubator/mc-router/questions.yaml @@ -0,0 +1,125 @@ +# Include{groups} +portals: {} +questions: +# Include{global} +# Include{workload} +# Include{workloadDeployment} +# Include{replicas2} +# Include{podSpec} +# Include{containerMain} +# Include{containerBasic} +# Include{containerAdvanced} +# Include{containerConfig} +# Include{podOptions} + - variable: mcrouter + group: App Configuration + label: MC Router Configuration + schema: + additional_attrs: true + type: dict + attrs: + - variable: host_minecraft + label: Host and Minecraft + schema: + type: list + default: [] + items: + - variable: domain_minecraft_service + label: Domain and Minecraft Service + schema: + type: string + default: "minecraft.local=localhost:25565" + valid_chars: '^([\w.-]+)=([A-Za-z0-9.-]+):(\d+)$' + required: true +# Include{serviceRoot} + - variable: main + label: Main Service + description: The Primary service on which the Minecraft Server runs on + schema: + additional_attrs: true + type: dict + attrs: +# Include{serviceSelectorLoadBalancer} +# Include{serviceSelectorExtras} + - variable: main + label: Main Service Port Configuration + schema: + additional_attrs: true + type: dict + attrs: + - variable: port + label: Port + description: This port exposes the container port on the service + schema: + type: int + default: 25564 + required: true + - variable: minecraft + label: Minecraft Service + description: The Minecraft service. + schema: + additional_attrs: true + type: dict + attrs: +# Include{serviceSelectorLoadBalancer} +# Include{serviceSelectorExtras} + - variable: minecraft + label: Minecraft Service Port Configuration + schema: + additional_attrs: true + type: dict + attrs: + - variable: port + label: Port + description: This port exposes the container port on the service + schema: + type: int + default: 25565 + required: true +# Include{serviceExpertRoot} +# Include{serviceExpert} +# Include{serviceList} +# Include{persistenceList} +# Include{ingressRoot} + - variable: main + label: "Main Ingress" + schema: + additional_attrs: true + type: dict + attrs: +# Include{ingressDefault} +# Include{ingressTLS} +# Include{ingressTraefik} +# Include{ingressAdvanced} +# Include{ingressList} +# Include{securityContextRoot} + + - variable: runAsUser + label: "runAsUser" + description: "The UserID of the user running the application" + schema: + type: int + default: 568 + - variable: runAsGroup + label: "runAsGroup" + description: "The groupID this App of the user running the application" + schema: + type: int + default: 568 +# Include{securityContextContainer} +# Include{securityContextAdvanced} +# Include{securityContextPod} + - variable: fsGroup + label: "fsGroup" + description: "The group that should own ALL storage." + schema: + type: int + default: 568 + +# Include{resources} +# Include{advanced} +# Include{addons} +# Include{codeserver} +# Include{netshoot} +# Include{vpn} +# Include{documentation} diff --git a/charts/incubator/mc-router/templates/NOTES.txt b/charts/incubator/mc-router/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/mc-router/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/mc-router/templates/_secrets.tpl b/charts/incubator/mc-router/templates/_secrets.tpl new file mode 100644 index 00000000000..61883b6b82f --- /dev/null +++ b/charts/incubator/mc-router/templates/_secrets.tpl @@ -0,0 +1,8 @@ +{{/* Define the secrets */}} +{{- define "mcrouter.secrets" -}} +{{- $mcrouter := .Values.mcrouter }} + +enabled: true +data: + MAPPING: {{ join "," $mcrouter.host_minecraft }} +{{- end -}} diff --git a/charts/incubator/mc-router/templates/common.yaml b/charts/incubator/mc-router/templates/common.yaml new file mode 100644 index 00000000000..1e2918e30fc --- /dev/null +++ b/charts/incubator/mc-router/templates/common.yaml @@ -0,0 +1,11 @@ +{{/* Make sure all variables are set properly */}} +{{- include "tc.v1.common.loader.init" . }} + +{{/* Render secrets for mcrouter */}} +{{- $secrets := include "mcrouter.secrets" . | fromYaml -}} +{{- if $secrets -}} + {{- $_ := set .Values.secret "secrets" $secrets -}} +{{- end -}} + +{{/* Render the templates */}} +{{ include "tc.v1.common.loader.apply" . }} diff --git a/charts/incubator/mc-router/values.yaml b/charts/incubator/mc-router/values.yaml new file mode 100644 index 00000000000..8b061508491 --- /dev/null +++ b/charts/incubator/mc-router/values.yaml @@ -0,0 +1,43 @@ +image: + repository: tccr.io/truecharts/mc-router + pullPolicy: IfNotPresent + tag: v1.18.1@sha256:24c0c3e65c62a54eabf1a461ad8d0789d444f9b93c130d5720c249b703dafc23 + +service: + main: + ports: + main: + port: 25564 + minecraft: + enabled: true + ports: + minecraft: + enabled: true + port: 25565 + +mcrouter: + host_minecraft: + - "minecraft.local=localhost:25566" + +workload: + main: + podSpec: + containers: + main: + probes: + liveness: + enabled: false + readiness: + enabled: false + startup: + enabled: false + envFrom: + - secretRef: + name: "secrets" + env: + API_BINDING: ":{{ .Values.service.main.ports.main.port }}" + PORT: "{{ .Values.service.minecraft.ports.minecraft.port }}" + +portal: + open: + enabled: false