2022-07-22 20:19:45 +00:00
|
|
|
image:
|
|
|
|
pullPolicy: IfNotPresent
|
2023-11-17 10:22:57 +00:00
|
|
|
repository: devidian/spaceengineers
|
2024-05-25 00:28:04 +00:00
|
|
|
tag: latest@sha256:46ab5178bc00c2c7679dc56056e3790f5b218db7ef94baecb6d5069c92ed0f29
|
2023-09-16 15:36:59 +00:00
|
|
|
securityContext:
|
|
|
|
container:
|
|
|
|
runAsNonRoot: false
|
|
|
|
readOnlyRootFilesystem: false
|
|
|
|
runAsUser: 0
|
|
|
|
runAsGroup: 0
|
|
|
|
service:
|
|
|
|
main:
|
|
|
|
ports:
|
|
|
|
main:
|
|
|
|
protocol: udp
|
|
|
|
port: 27017
|
2023-09-22 22:43:57 +00:00
|
|
|
steam:
|
|
|
|
enabled: true
|
|
|
|
ports:
|
|
|
|
steam:
|
|
|
|
protocol: udp
|
|
|
|
enabled: true
|
|
|
|
port: 27018
|
2023-09-16 15:36:59 +00:00
|
|
|
api:
|
|
|
|
enabled: true
|
|
|
|
ports:
|
|
|
|
api:
|
|
|
|
protocol: http
|
|
|
|
enabled: true
|
|
|
|
port: 18080
|
|
|
|
spaceengineers:
|
|
|
|
instance_name: "TestInstance"
|
|
|
|
public_ip: "1.2.3.4"
|
|
|
|
workload:
|
|
|
|
main:
|
|
|
|
podSpec:
|
|
|
|
containers:
|
|
|
|
main:
|
2023-09-22 22:43:57 +00:00
|
|
|
lifecycle:
|
|
|
|
postStart:
|
|
|
|
type: exec
|
|
|
|
command:
|
|
|
|
- /bin/sh
|
|
|
|
- -c
|
|
|
|
- |
|
|
|
|
INSTANCE_NAME="{{ .Values.spaceengineers.instance_name }}"
|
|
|
|
CONFIG_PATH="{{ .Values.persistence.instances.mountPath }}/$INSTANCE_NAME/SpaceEngineers-Dedicated.cfg"
|
|
|
|
|
|
|
|
# Define the new values for the port-related options
|
|
|
|
ServerPort="{{ .Values.service.main.ports.main.port }}"
|
|
|
|
SteamPort="{{ .Values.service.steam.ports.steam.port }}"
|
|
|
|
RemoteApiPort="{{ .Values.service.api.ports.api.port }}"
|
|
|
|
|
|
|
|
# Check if the configuration file exists
|
|
|
|
if [ -f "$CONFIG_PATH" ]; then
|
|
|
|
# Update the XML file with the new values using sed
|
|
|
|
sed -i "s/<SteamPort>[0-9]*<\/SteamPort>/<SteamPort>$SteamPort<\/SteamPort>/" "$CONFIG_PATH"
|
|
|
|
sed -i "s/<ServerPort>[0-9]*<\/ServerPort>/<ServerPort>$ServerPort<\/ServerPort>/" "$CONFIG_PATH"
|
|
|
|
sed -i "s/<RemoteApiPort>[0-9]*<\/RemoteApiPort>/<RemoteApiPort>$RemoteApiPort<\/RemoteApiPort>/" "$CONFIG_PATH"
|
|
|
|
|
|
|
|
echo "Port-related options updated for instance $INSTANCE_NAME:"
|
|
|
|
echo "SteamPort: $SteamPort"
|
|
|
|
echo "ServerPort: $ServerPort"
|
|
|
|
echo "RemoteApiPort: $RemoteApiPort"
|
|
|
|
else
|
|
|
|
echo "Configuration file not found. Please create it manually or check the path: $CONFIG_PATH"
|
|
|
|
fi
|
2023-09-16 15:36:59 +00:00
|
|
|
probes:
|
|
|
|
liveness:
|
|
|
|
enabled: false
|
|
|
|
readiness:
|
|
|
|
enabled: false
|
|
|
|
startup:
|
|
|
|
enabled: false
|
|
|
|
env:
|
|
|
|
INSTANCE_NAME: "{{ .Values.spaceengineers.instance_name }}"
|
|
|
|
PUBLIC_IP: "{{ .Values.spaceengineers.public_ip }}"
|
2022-07-22 20:19:45 +00:00
|
|
|
persistence:
|
2023-09-16 15:36:59 +00:00
|
|
|
steamcmd:
|
2022-07-22 20:19:45 +00:00
|
|
|
enabled: true
|
2023-09-16 15:36:59 +00:00
|
|
|
mountPath: /root/.steam
|
|
|
|
plugins:
|
2022-07-22 20:19:45 +00:00
|
|
|
enabled: true
|
2023-09-16 15:36:59 +00:00
|
|
|
mountPath: /appdata/space-engineers/plugins
|
2022-07-22 20:19:45 +00:00
|
|
|
serverfiles:
|
|
|
|
enabled: true
|
|
|
|
mountPath: /appdata/space-engineers/SpaceEngineersDedicated
|
2023-09-16 15:36:59 +00:00
|
|
|
instances:
|
2022-07-22 20:19:45 +00:00
|
|
|
enabled: true
|
2023-09-16 15:36:59 +00:00
|
|
|
mountPath: /appdata/space-engineers/instances
|
2022-08-08 21:25:02 +00:00
|
|
|
portal:
|
2023-09-16 15:36:59 +00:00
|
|
|
open:
|
|
|
|
enabled: false
|