Skip to content

Commit cceb369

Browse files
authored
Merge pull request #60 from max-pfeiffer/feature/helm-chart-existing-secret
Added existing secret and game mode support to helm chart
2 parents b082ee4 + f9f1739 commit cceb369

File tree

8 files changed

+725
-299
lines changed

8 files changed

+725
-299
lines changed

.github/workflows/code-quality.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Code Quality
22

3-
on: push
3+
on:
4+
push:
5+
paths:
6+
- build/**
7+
- tests/**
48

59
jobs:
610
code-quality:

charts/rust/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.0.0
18+
version: 1.1.0
1919

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

charts/rust/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ rustDedicatedServer:
6565
maxPlayers: "20"
6666
# World size
6767
worldSize: "3000"
68+
# Game mode. Options: vanilla, softcore, hardcore, weapontest, primitive
69+
gameMode: "vanilla"
6870
# Map seed, always use a string here as Helm number conversion might produce incompatible strings.
6971
seed: "666"
7072
# Use 1 to switch on websocket rcon, 0 to switch off websocket rcon
@@ -73,4 +75,8 @@ rustDedicatedServer:
7375
rconPassword: "yourpassword"
7476
# Volume size for server identity directory. Rust server stores it's config, saves and blueprints there
7577
volumeStorageSize: "1Gi"
78+
# Name of the existing secret to use for the rconPassword.
79+
# If this is set, rustDedicatedServer.rconPassword will be ignored.
80+
# The existing secret needs to have stored Rust rconPassword under the key rconPassword.
81+
existingSecret: ""
7682
```

charts/rust/templates/secret.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if not .Values.rustDedicatedServer.existingSecret }}
12
apiVersion: v1
23
kind: Secret
34
metadata:
@@ -6,4 +7,5 @@ metadata:
67
{{- include "rust.labels" . | nindent 4 }}
78
type: Opaque
89
stringData:
9-
rconPassword: "{{ .Values.rustDedicatedServer.rconPassword }}"
10+
rconPassword: "{{ .Values.rustDedicatedServer.rconPassword }}"
11+
{{- end }}

charts/rust/templates/statefulset.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ spec:
4949
- "+server.worldsize"
5050
- "{{ .Values.rustDedicatedServer.worldSize }}"
5151
- "+server.gamemode"
52-
- "vanilla"
52+
- "{{ .Values.rustDedicatedServer.gameMode }}"
5353
- "+server.seed"
5454
- "{{ .Values.rustDedicatedServer.seed }}"
5555
- "+server.identity"
@@ -68,7 +68,7 @@ spec:
6868
- name: RCON_PASSWORD
6969
valueFrom:
7070
secretKeyRef:
71-
name: {{ include "rust.fullname" . }}
71+
name: {{ ternary (include "rust.fullname" .) .Values.rustDedicatedServer.existingSecret (empty .Values.rustDedicatedServer.existingSecret) }}
7272
key: rconPassword
7373
ports:
7474
- name: server-port

charts/rust/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ rustDedicatedServer:
105105
maxPlayers: "20"
106106
# World size
107107
worldSize: "3000"
108+
# Game mode. Options: vanilla, softcore, hardcore, weapontest, primitive
109+
gameMode: "vanilla"
108110
# Map seed, always use a string here as Helm number conversion might produce incompatible strings.
109111
seed: "666"
110112
# Use 1 to switch on websocket rcon, 0 to switch off websocket rcon
@@ -113,3 +115,7 @@ rustDedicatedServer:
113115
rconPassword: "yourpassword"
114116
# Volume size for server identity directory. Rust server stores it's config, saves and blueprints there
115117
volumeStorageSize: "1Gi"
118+
# Name of the existing secret to use for the rconPassword.
119+
# If this is set, rustDedicatedServer.rconPassword will be ignored.
120+
# The existing secret needs to have stored Rust rconPassword under the key rconPassword.
121+
existingSecret: ""

poetry.lock

Lines changed: 700 additions & 292 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ steam = {git = "https://github.com/detiam/steam_websocket.git", branch = "master
1515
[tool.poetry.group.dev.dependencies]
1616
bcrypt = "4.3.0"
1717
furl = "2.1.4"
18-
pre-commit = "4.2.0"
18+
pre-commit = "4.3.0"
1919
pytest = "8.4.1"
2020
pytest-cov = "6.2.1"
21-
testcontainers = "4.10.0"
21+
testcontainers = "4.12.0"
2222

2323
[tool.ruff]
2424
exclude = [".venv"]

0 commit comments

Comments
 (0)