-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #163 from GiganticMinecraft/add-mcserver-helm-chart
Add mcserver helm chart
- Loading branch information
Showing
4 changed files
with
85 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v2 | ||
name: proxy-kubernetes-cloudflared-mcserver | ||
version: "1.0.0" | ||
maintainers: | ||
- name: GiganticMinecraft |
58 changes: 58 additions & 0 deletions
58
helm-charts/proxy-kubernetes-cloudflared-mcserver/templates/deployment.yaml
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: cloudflared-mcserver--{{ .Values.MCServerName }} | ||
labels: | ||
app: cloudflared-mcserver--{{ .Values.MCServerName }} | ||
appgroup: cloudflared | ||
release-namespace: {{ .Release.Namespace }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: cloudflared-mcserver--{{ .Values.MCServerName }} | ||
appgroup: cloudflared | ||
template: | ||
metadata: | ||
labels: | ||
app: cloudflared-mcserver--{{ .Values.MCServerName }} | ||
appgroup: cloudflared | ||
env: prod | ||
spec: | ||
containers: | ||
- name: cloudflared-mcserver--{{ .Values.MCServerName }} | ||
image: cloudflare/cloudflared:2021.12.1 | ||
args: | ||
- access | ||
- tcp | ||
- --loglevel | ||
- debug | ||
- --hostname | ||
- mcserver--{{ .Values.MCServerName }}.{{ .Values.subdomain }}.seichi.click | ||
- --url | ||
- 0.0.0.0:25565 | ||
env: | ||
- name: TUNNEL_SERVICE_TOKEN_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: cloudflared-access-token | ||
key: TUNNEL_SERVICE_TOKEN_ID | ||
- name: TUNNEL_SERVICE_TOKEN_SECRET | ||
valueFrom: | ||
secretKeyRef: | ||
name: cloudflared-access-token | ||
key: TUNNEL_SERVICE_TOKEN_SECRET | ||
ports: | ||
- containerPort: 25565 | ||
name: minecraft | ||
readinessProbe: | ||
initialDelaySeconds: 15 | ||
periodSeconds: 5 | ||
timeoutSeconds: 1 | ||
successThreshold: 2 | ||
failureThreshold: 2 | ||
tcpSocket: | ||
port: 25565 | ||
resources: | ||
requests: | ||
memory: 64Mi |
15 changes: 15 additions & 0 deletions
15
helm-charts/proxy-kubernetes-cloudflared-mcserver/templates/service.yaml
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: cloudflared-mcserver--{{ .Values.MCServerName }} | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- name: minecraft | ||
port: 25565 | ||
protocol: TCP | ||
targetPort: 25565 | ||
selector: | ||
app: cloudflared-mcserver--{{ .Values.MCServerName }} | ||
appgroup: cloudflared | ||
release-namespace: {{ .Release.Namespace }} |
7 changes: 7 additions & 0 deletions
7
helm-charts/proxy-kubernetes-cloudflared-mcserver/values.yaml
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# プロキシされる先のマインクラフトサーバーの識別子。 | ||
MCServerName: "s0" | ||
# ホスト名の seichi.click 以下のサブドメイン名。 | ||
subdomain: "tcp-network" | ||
# この二つの設定で、プロキシ先の hostname が | ||
# mcserver--{{ .Values.mcserver-name }}.{{ .Values.subdomain }}.seichi.click | ||
# のように設定される。 |