game.seasonalEvents was handed to the container unchanged, into the image's DISABLESEASONALEVENTS. Its default true therefore wrote DISABLESEASONALEVENTS=true: the seasonal events were OFF in every install this chart has ever produced, while values.schema.json described the very same key as "true means events are enabled" (#215). Of the two ways out, this is the loud one. Inverting the template under the old key would have flipped the behaviour of every existing release in silence - the same class of mistake that created the issue. Renaming the key cannot be missed: game.seasonalEvents no longer exists, additionalProperties is false on the game block, and a values file that still carries it fails schema validation on upgrade instead of quietly meaning the opposite. The new key is positive (enableSeasonalEvents) to avoid a double negative, so the chart negates it on the way into the env var. Go's "not" cannot do that: it reads every non-empty string as true, and the schema deliberately accepts the string form of booleans, so "false" would have flipped the wrong way. The helper compares explicitly and fails on anything that is neither true nor false rather than filing it under "off". The default is enableSeasonalEvents: false, which renders the DISABLESEASONALEVENTS this chart has always rendered. At chart defaults the 6.1.0 and 7.0.0 manifests are identical, so upgrading alone moves no server; switching the events on is now a deliberate act with a key that means it. Separate finding from the same issue, fixed here because it lives in the block being touched: "--set game=null" - or a leftover "game:" whose sub-keys were deleted - aborted the render with a nil pointer at .Values.game.maxPlayers. The game block never got the null-safe treatment of #99 that probes, security contexts and resources have. It now falls back to the documented defaults, and the schema accepts the null accordingly. The same gap remains in the dev and server blocks; it is reported, not fixed here. Major bump: a values key is removed, and the schema rejects it.
121 lines
5.1 KiB
YAML
121 lines
5.1 KiB
YAML
{{- $game := fromYaml (include "satisfactory.game" .Values.game) -}}
|
|
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: "{{ include "satisfactory.formatNumber" $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: "{{ $game.experimental }}"
|
|
# The image only knows the negative switch, so game.enableSeasonalEvents
|
|
# is negated here (#215): true -> "false" (events run).
|
|
- name: DISABLESEASONALEVENTS
|
|
value: "{{ include "satisfactory.disableSeasonalEvents" $game.enableSeasonalEvents }}"
|
|
- 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: {}
|