Skip to content

Commit d0cdf7d

Browse files
authored
Allow velocity forwarding secret to be passed as value (#236)
1 parent 735e131 commit d0cdf7d

File tree

5 files changed

+45
-1
lines changed

5 files changed

+45
-1
lines changed

charts/minecraft-proxy/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v1
22
name: minecraft-proxy
3-
version: 3.8.2
3+
version: 3.8.3
44
appVersion: SeeValues
55
description: Minecraft proxy server (BungeeCord, Waterfall, Velocity, etc.)
66
keywords:

charts/minecraft-proxy/templates/deployment.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ spec:
170170
mountPath: {{ .Values.minecraftProxy.configFilePath }}
171171
subPath: config.yml
172172
{{- end }}
173+
{{- if .Values.minecraftProxy.velocityForwardingSecret }}
174+
- name: velocity-forwarding-secret
175+
mountPath: {{ .Values.minecraftProxy.velocityForwardingSecretFilePath }}
176+
subPath: forwarding.secret
177+
readOnly: true
178+
{{- end }}
173179
{{- range .Values.extraVolumes }}
174180
{{- if .volumeMounts }}
175181
{{- toYaml .volumeMounts | nindent 8 }}
@@ -194,6 +200,14 @@ spec:
194200
{{- else }}
195201
emptyDir: {}
196202
{{- end }}
203+
{{- if .Values.minecraftProxy.velocityForwardingSecret }}
204+
- name: velocity-forwarding-secret
205+
secret:
206+
secretName: "{{ template "proxy.fullname" . }}-velocity-forwarding-secret"
207+
items:
208+
- key: velocity-forwarding-secret
209+
path: forwarding.secret
210+
{{- end }}
197211
{{- if .Values.minecraftProxy.config }}
198212
- name: config
199213
configMap:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{{- if .Values.minecraftProxy.velocityForwardingSecret }}
2+
---
3+
apiVersion: v1
4+
kind: Secret
5+
metadata:
6+
name: "{{ template "proxy.fullname" . }}-velocity-forwarding-secret"
7+
namespace: {{ .Release.Namespace }}
8+
labels:
9+
app: {{ template "proxy.fullname" . }}
10+
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
11+
release: "{{ .Release.Name }}"
12+
heritage: "{{ .Release.Service }}"
13+
type: Opaque
14+
data:
15+
velocity-forwarding-secret:
16+
{{ default "" .Values.minecraftProxy.velocityForwardingSecret | b64enc | quote }}
17+
{{- end }}

charts/minecraft-proxy/values.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,19 @@ minecraftProxy:
188188
# forge_support: false
189189
# inject_commands: false
190190

191+
# If running Velocity, you can provide a velocity.toml file like so:
192+
# configFilePath: /server/velocity.toml
193+
# config: |-
194+
# config-version = "2.7"
195+
# bind = "0.0.0.0:25577"
196+
# motd = "Hello from Helmified Velocity!"
197+
# show-max-players = 500
198+
# player-info-forwarding-mode = "modern"
199+
200+
# Needed when you wish to pass a forwarding secret to Velocity
201+
# velocityForwardingSecret: "CHANGEME!"
202+
# velocityForwardingSecretFilePath: /server/forwarding.secret
203+
191204
rcon:
192205
# If you enable this, make SURE to change your password below.
193206
enabled: false

0 commit comments

Comments
 (0)