add unzip and copy properties init container, don't mount properties
This commit is contained in:
@@ -14,27 +14,36 @@ spec:
|
|||||||
app: {{ .Release.Name }}
|
app: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: get-version
|
- name: unzip
|
||||||
image: {{ .Values.get_server.image }}
|
|
||||||
imagePullPolicy: Always
|
|
||||||
env:
|
|
||||||
- name: SERVER_VERSION
|
|
||||||
value: {{ .Values.server_version }}
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /downloads
|
|
||||||
name: data
|
|
||||||
containers:
|
|
||||||
- name: {{ .Release.Name }}
|
|
||||||
image: {{ .Values.image }}
|
image: {{ .Values.image }}
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
|
command: ["/bin/bash"]
|
||||||
|
args: ["-c", "unzip -n -d . /the-1122-pack/the-1122-pack_1.3.7.zip"]
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /mc_data
|
||||||
|
name: data
|
||||||
|
- name: copy-properties
|
||||||
|
image: debian:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
command: ["/bin/bash"]
|
||||||
|
args: ["-c", "cp -f /server.properties /mc_data/server.properties"]
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /mc_data
|
||||||
|
name: data
|
||||||
|
- name: properties
|
||||||
|
mountPath: /server.properties
|
||||||
|
subPath: server.properties
|
||||||
|
containers:
|
||||||
|
- name: server
|
||||||
|
image: {{ .Values.image }}
|
||||||
|
imagePullPolicy: Always
|
||||||
|
command: ["/bin/bash"]
|
||||||
|
args: ["-c", 'java -server -Xmx"$MAX_RAM"G -Dfml.queryResult=confirm -jar forge-1.12.2-14.23.5.2855.jar nogui']
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 25565
|
- containerPort: 25565
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /mc_data
|
- mountPath: /mc_data
|
||||||
name: data
|
name: data
|
||||||
- name: properties
|
|
||||||
mountPath: /mc_data/server.properties
|
|
||||||
subPath: server.properties
|
|
||||||
- name: properties
|
- name: properties
|
||||||
mountPath: /mc_data/eula.txt
|
mountPath: /mc_data/eula.txt
|
||||||
subPath: eula.txt
|
subPath: eula.txt
|
||||||
|
|||||||
Reference in New Issue
Block a user