No ingress gate: this chart has no Ingress at all (game and messaging ports are exposed via NodePort), and ingress.domain appears neither in its templates nor in its values. 1. values.schema.json (#68): additionalProperties: false on every chart-owned object level. Like teamspeak-server, this chart keeps env, probes and securityContext at the TOP level, and the schema mirrors that shape. 2. Null-safety for hardening, probes and resources (#99). What a rebuilt default must not lose here: - liveness and startup run the image's own healthcheck script via exec. It queries the server's HTTPS API on SERVERGAMEPORT, so it survives a port override, which a tcpSocket default could not. - readiness keeps the named "api" port. - the resources default keeps limitFactor 2 rather than the repo-wide 3, which is what holds the memory limit at the published 8Gi. - the pod context keeps fsGroupChangePolicy OnRootMismatch, which is what avoids a recursive chown of multi-GB game files on every start. server.storage stays deliberately not null-safe: an erased value yields an invalid PVC, which is the loud class #99 excludes. This chart is excluded from the CI install-test, so the local proof is the only one. Rendering is byte-identical to 4.0.0 with default values and with the production bundle values, and the rendered manifests were additionally validated by the cluster's API server via a server-side dry-run.
118 lines
4.8 KiB
YAML
118 lines
4.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-sfs
|
|
labels:
|
|
app: {{ .Release.Name }}-{{ .Chart.Name }}-sfs
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: {{ .Release.Name }}-{{ .Chart.Name }}-sfs
|
|
serviceName: {{ .Release.Name }}-{{ .Chart.Name }}-service
|
|
replicas: {{ include "satisfactory.replicas" (dict "scaleDown" .Values.scaleDown "replicas" .Values.server.replicas) }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ .Release.Name }}-{{ .Chart.Name }}-sfs
|
|
spec:
|
|
automountServiceAccountToken: false
|
|
securityContext:
|
|
{{- include "satisfactory.podSecurityContext" .Values.securityContext | nindent 8 }}
|
|
containers:
|
|
- name: {{ .Release.Name }}-{{ .Chart.Name }}-sfs
|
|
image: "ghcr.io/wolveix/satisfactory-server:{{ .Chart.AppVersion }}"
|
|
env:
|
|
- name: DEBUG
|
|
value: "{{ .Values.dev.debug }}"
|
|
- name: MAXPLAYERS
|
|
value: "{{ .Values.game.maxPlayers }}"
|
|
# PUID/PGID are only used by the image's root entrypoint path;
|
|
# with the default non-root security context they are ignored.
|
|
- name: PGID
|
|
value: "1000"
|
|
- name: PUID
|
|
value: "1000"
|
|
- name: SKIPUPDATE
|
|
value: "false"
|
|
- name: STEAMBETA
|
|
value: "{{ .Values.game.experimental }}"
|
|
- name: DISABLESEASONALEVENTS
|
|
value: "{{ .Values.game.seasonalEvents }}"
|
|
- name: SERVERGAMEPORT
|
|
value: "{{ .Values.server.gamePort }}"
|
|
- name: SERVERMESSAGINGPORT
|
|
value: "{{ .Values.server.messagingPort }}"
|
|
{{- range $value := .Values.env }}
|
|
{{- if $value.value }}
|
|
- name: {{ $value.name }}
|
|
value: {{ tpl $value.value $ }}
|
|
{{- else if $value.valueFrom }}
|
|
{{- if $value.valueFrom.secretKeyRef }}
|
|
- name: {{ $value.name }}
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ tpl $value.valueFrom.secretKeyRef.name $ }}
|
|
key: {{ tpl $value.valueFrom.secretKeyRef.key $ }}
|
|
{{- else if $value.valueFrom.configMapKeyRef }}
|
|
- name: {{ $value.name }}
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: {{ tpl $value.valueFrom.configMapKeyRef.name $ }}
|
|
key: {{ tpl $value.valueFrom.configMapKeyRef.key $ }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
ports:
|
|
- name: "api"
|
|
containerPort: {{ .Values.server.gamePort }}
|
|
protocol: TCP
|
|
- name: "game"
|
|
containerPort: {{ .Values.server.gamePort }}
|
|
protocol: UDP
|
|
- name: "messaging"
|
|
containerPort: {{ .Values.server.messagingPort }}
|
|
protocol: TCP
|
|
livenessProbe:
|
|
{{- include "satisfactory.livenessProbe" .Values.livenessProbe | nindent 12 }}
|
|
readinessProbe:
|
|
{{- include "satisfactory.readinessProbe" .Values.readinessProbe | nindent 12 }}
|
|
startupProbe:
|
|
{{- include "satisfactory.startupProbe" .Values.startupProbe | nindent 12 }}
|
|
resources:
|
|
{{- include "satisfactory.effectiveResources" .Values.server.resources | nindent 12 }}
|
|
volumeMounts:
|
|
- name: satisfactory-volume
|
|
mountPath: /config
|
|
subPath: config/
|
|
- name: satisfactory-volume
|
|
mountPath: /config/gamefiles
|
|
subPath: gameFiles/
|
|
# Writable paths required by readOnlyRootFilesystem: the steam
|
|
# user's home dot-dirs (steamcmd bootstraps itself into
|
|
# ~/.local/share/Steam, keeps state under ~/.steam, and the game
|
|
# saves symlink lives under ~/.config) and /tmp (crash dumps).
|
|
# Everything else is written to the PVC at /config.
|
|
- name: steam-home
|
|
mountPath: /home/steam/.steam
|
|
subPath: dot-steam
|
|
- name: steam-home
|
|
mountPath: /home/steam/.config
|
|
subPath: dot-config
|
|
- name: steam-home
|
|
mountPath: /home/steam/.local
|
|
subPath: dot-local
|
|
- name: tmp
|
|
mountPath: /tmp
|
|
securityContext:
|
|
{{- include "satisfactory.containerSecurityContext" .Values.securityContext | nindent 12 }}
|
|
volumes:
|
|
- name: satisfactory-volume
|
|
persistentVolumeClaim:
|
|
# Deliberate exception from the naming scheme: renaming the PVC
|
|
# would detach existing data (see README, naming exceptions).
|
|
claimName: {{ .Release.Name }}-{{ .Chart.Name }}-vc
|
|
- name: steam-home
|
|
emptyDir: {}
|
|
- name: tmp
|
|
emptyDir: {}
|