Allow custom server versions

Allow user to specify server version. Download on server init.
This commit is contained in:
ducoterra
2021-10-30 21:14:00 -04:00
parent 9e788ee711
commit ba5ab53bdb
5 changed files with 34 additions and 4 deletions

View File

@@ -13,9 +13,27 @@ spec:
labels:
app: {{ .Release.Name }}
spec:
initContainers:
- name: get-version
image: {{ .Values.get_server.image }}
imagePullPolicy: Always
env:
- name: SERVER_VERSION
value: {{ .Values.server_version }}
volumeMounts:
- mountPath: /downloads
name: data
- name: download-server
image: {{ .Values.get_server.image }}
imagePullPolicy: Always
command: ["bash", "-c", "curl -o server.jar $(cat SERVER_VERSION)"]
volumeMounts:
- mountPath: /downloads
name: data
containers:
- name: {{ .Release.Name }}
image: {{ .Values.image }}
imagePullPolicy: Always
ports:
- containerPort: 25565
volumeMounts: