Skip to content

Commit d79d012

Browse files
committed
make rcon_port configurable, update valuse
1 parent b6b3d91 commit d79d012

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

charts/factorio-server-charts/templates/deployment.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ spec:
143143
- name: factorio
144144
containerPort: 34197
145145
protocol: UDP
146-
- containerPort: 27015
146+
- containerPort: {{ .Values.factorioServer.rcon_port | quote }}
147147
protocol: TCP
148148
resources:
149149
{{ toYaml .Values.resources | indent 10 }}
@@ -171,6 +171,8 @@ spec:
171171
value: {{ .Values.factorioServer.enable_space_age | quote }}
172172
- name: CONFIG
173173
value: /factorio/configs
174+
- name: RCON_PORT
175+
value: {{ .Values.factorioServer.rcon_port | quote }}
174176
{{- if .Values.rcon_api.enabled }}
175177
- name: {{ template "factorio-server-charts.fullname" . }}-rcon-api
176178
image: "{{ .Values.rcon_api.image.repository }}:{{ .Values.rcon_api.image.tag }}"
@@ -196,7 +198,7 @@ spec:
196198
- name: FACTORIO_RCON_HOST
197199
value: "localhost"
198200
- name: FACTORIO_RCON_PORT
199-
value: "27015"
201+
value: {{ .Values.factorioServer.rcon_port | quote }}
200202
- name: FACTORIO_RCON_PASSWORD
201203
{{- if .Values.rcon.passwordSecret }}
202204
valueFrom:

charts/factorio-server-charts/templates/rcon-service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
ports:
1818
- name: rcon
1919
port: {{ .Values.rcon.port }}
20-
targetPort: 27015
20+
targetPort: {{ .Values.factorioServer.rcon_port | quote }}
2121
{{- if eq .Values.rcon.type "NodePort" }}
2222
nodePort: {{ .Values.rcon.port}}
2323
{{- end }}

charts/factorio-server-charts/values.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ mods:
145145
## @param factorioServer.generate_new_save Generate a new save if `save_name` is not found
146146
## @param factorioServer.update_mods_on_start Update mods on server start
147147
## @param factorioServer.load_latest_save Lets the game know if you want to load the latest save
148+
## @param factorioServer.rcon_port Factorio Server RCON port
148149
factorioServer:
149150
# name to use for the save file
150151
save_name: "replaceMe"
@@ -156,6 +157,10 @@ factorioServer:
156157
load_latest_save: true
157158
# enables or disables the mods for DLC Space Age in mod-list.json
158159
enable_space_age: true
160+
# factorio game rcon port
161+
# this port setting is typically for internal Kubernetes configuration only, and in most cases, it does not need to be modified.
162+
# if it is necessary to change the rcon server port where you connect to it, update the "rcon.port" value accordingly.
163+
rcon_port: 27015
159164

160165
import_save:
161166
# enable save importer
@@ -290,15 +295,15 @@ server_settings:
290295
## @param rcon.external Enable RCON external access (deploy RCON service)
291296
## @param rcon.type RCON service type
292297
## @param rcon.serviceAnnotations RCON service annotations
293-
## @param rcon.passwordSecret Existing secret containing a `password` data field
298+
## @param rcon.passwordSecret Existing secret containing a `rconpw` data field
294299
## @param rcon.password Password for RCON, ignored if `rcon.passwordSecret` is set
295300
## @param rcon.port RCON service external port
296301
# Password and port for the rcon service
297302
rcon:
298303
external: true
299304
type: LoadBalancer
300305
serviceAnnotations: {}
301-
# Existing secret containing a `password` data field
306+
# Existing secret containing a `rconpw` data field
302307
passwordSecret: ""
303308

304309
# Password for rcon

0 commit comments

Comments
 (0)