Skip to content

Allow velocity forwarding secret to be passed as value (minecraft-proxy) #236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/minecraft-proxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: minecraft-proxy
version: 3.8.2
version: 3.8.3
appVersion: SeeValues
description: Minecraft proxy server (BungeeCord, Waterfall, Velocity, etc.)
keywords:
Expand Down
14 changes: 14 additions & 0 deletions charts/minecraft-proxy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ spec:
mountPath: {{ .Values.minecraftProxy.configFilePath }}
subPath: config.yml
{{- end }}
{{- if .Values.minecraftProxy.velocityForwardingSecret }}
- name: velocity-forwarding-secret
mountPath: {{ .Values.minecraftProxy.velocityForwardingSecretFilePath }}
subPath: forwarding.secret
readOnly: true
{{- end }}
{{- range .Values.extraVolumes }}
{{- if .volumeMounts }}
{{- toYaml .volumeMounts | nindent 8 }}
Expand All @@ -194,6 +200,14 @@ spec:
{{- else }}
emptyDir: {}
{{- end }}
{{- if .Values.minecraftProxy.velocityForwardingSecret }}
- name: velocity-forwarding-secret
secret:
secretName: "{{ template "proxy.fullname" . }}-velocity-forwarding-secret"
items:
- key: velocity-forwarding-secret
path: forwarding.secret
{{- end }}
{{- if .Values.minecraftProxy.config }}
- name: config
configMap:
Expand Down
17 changes: 17 additions & 0 deletions charts/minecraft-proxy/templates/velocity-forwarding-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.minecraftProxy.velocityForwardingSecret }}
---
apiVersion: v1
kind: Secret
metadata:
name: "{{ template "proxy.fullname" . }}-velocity-forwarding-secret"
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "proxy.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
type: Opaque
data:
velocity-forwarding-secret:
{{ default "" .Values.minecraftProxy.velocityForwardingSecret | b64enc | quote }}
{{- end }}
13 changes: 13 additions & 0 deletions charts/minecraft-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,19 @@ minecraftProxy:
# forge_support: false
# inject_commands: false

# If running Velocity, you can provide a velocity.toml file like so:
# configFilePath: /server/velocity.toml
# config: |-
# config-version = "2.7"
# bind = "0.0.0.0:25577"
# motd = "Hello from Helmified Velocity!"
# show-max-players = 500
# player-info-forwarding-mode = "modern"

# Needed when you wish to pass a forwarding secret to Velocity
# velocityForwardingSecret: "CHANGEME!"
# velocityForwardingSecretFilePath: /server/forwarding.secret

rcon:
# If you enable this, make SURE to change your password below.
enabled: false
Expand Down
Loading