Skip to content

Commit bd1f6c6

Browse files
author
James Rhoat
authored
Merge pull request #23 from avanier/feature/add-security-context
2 parents ae4e899 + f6387f9 commit bd1f6c6

File tree

4 files changed

+33
-5
lines changed

4 files changed

+33
-5
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
## Changelog
22

3+
### V1.2.0
4+
5+
#### Non-Breaking Changes
6+
7+
- Added `securityContext` field to values.yaml
8+
9+
### V1.1.2
10+
11+
#### Non-Breaking Changes
12+
13+
- Fixed a bug where the `game-password` volume had an invalid name
14+
15+
### V1.1.1
16+
17+
#### Non-Breaking Changes
18+
19+
- Fixed a bug where the `account-data` volume had an invalid name
20+
- Extended the pod's DNS config to ensure correct DNS resolution in certain
21+
environments
22+
323
### V1.1.0
424

525
#### Breaking Changes

charts/factorio-server-charts/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ sources:
2020
# This is the chart version. This version number should be incremented each time you make changes
2121
# to the chart and its templates, including the app version.
2222
# Versions are expected to follow Semantic Versioning (https://semver.org/)
23-
version: 1.1.2
23+
version: 1.2.0
2424

2525
# This is the version number of the application being deployed. This version number should be
2626
# incremented each time you make changes to the application. Versions are not expected to

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ spec:
5858
chown -vR factorio:factorio /factorio
5959
chmod -vR 777 /factorio/configs
6060
ls -alth /factorio
61+
{{- with .Values.securityContext }}
6162
securityContext:
62-
runAsUser: 0
63+
{{- toYaml . | nindent 12 }}
64+
{{- end }}
6365
volumeMounts:
6466
- name: datadir
6567
mountPath: /factorio
@@ -87,8 +89,10 @@ spec:
8789
- |
8890
mkdir -p /factorio/mods
8991
bash /scripts/mod-downloader.sh
92+
{{- with .Values.securityContext }}
9093
securityContext:
91-
runAsUser: 0
94+
{{- toYaml . | nindent 12 }}
95+
{{- end }}
9296
volumeMounts:
9397
- name: datadir
9498
mountPath: /factorio
@@ -103,8 +107,10 @@ spec:
103107
- name: {{ template "factorio-server-charts.fullname" . }}
104108
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
105109
imagePullPolicy: {{ .Values.image.pullPolicy }}
110+
{{- with .Values.securityContext }}
106111
securityContext:
107-
runAsUser: 0
112+
{{- toYaml . | nindent 10 }}
113+
{{- end }}
108114
livenessProbe:
109115
exec:
110116
command:

charts/factorio-server-charts/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
## @param strategy.type Strategy used to replace old pods
99
## @param tolerations Tolerations for pod assignment
1010
## @param affinity Affinity rules for pod assignment
11-
11+
## @param securityContext Useful for fixing file permissions. See official [docs](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/).
1212

1313
replicaCount: 1
1414

15+
securityContext:
16+
runAsUser: 0
1517

1618
#### Image Configuration ####
1719
## @section Image Parameters

0 commit comments

Comments
 (0)