Skip to content

Commit 9ab6ce0

Browse files
authored
Merge pull request #44 from Lyr-7D1h/added_tolerations
Added icon & tolerations
2 parents b55eec4 + 5ebb156 commit 9ab6ce0

File tree

5 files changed

+46
-33
lines changed

5 files changed

+46
-33
lines changed

README.md

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kubernetes deployment for a valheim game-server. Based off the dockerization wor
44

55
## Usage
66

7-
Note: This assumes the node you are running on can use `/data/valheim` mounted as a host volume for persistence.
7+
Note: This assumes the node you are running on can use `/data/valheim` mounted as a host volume for persistence.
88

99
```bash
1010
helm repo add valheim-k8s https://addyvan.github.io/valheim-k8s/
@@ -19,26 +19,27 @@ helm install valheim-server valheim-k8s/valheim-k8s \
1919

2020
## Configuration
2121

22-
| Parameter | Description | Default |
23-
|:-------------------------------------------|:-----------------------------------------------------------------------|:------------------------|
24-
| `worldName` | Prefix of the world files to use (will make new if missing) | `example-world-name` |
25-
| `serverName` | Server name displayed in the server browser(s) | `example-server-name` |
26-
| `password` | Server password | `password` |
27-
| `storage.kind` | Storage strategy/soln used to provide the game-server with persistence | `hostvol` |
28-
| `storage.hostvol.path` | The folder to be mounted into /config in the game-server pod | `/data/valheim` |
29-
| `storage.pvc.storageClassName` | The storageClass used to create the persistentVolumeClaim | `default` |
30-
| `storage.pvc.size` | The size of the persistent volume to be created | `1Gi` |
31-
| `serverStorage.kind` | Storage strategy/soln used to save the server installation files | `hostvol` |
32-
| `serverStorage.hostvol.path` | The folder to be mounted into /opt/valheim in the game-server pod | `/data/valheim-server` |
33-
| `serverStorage.pvc.storageClassName` | The storageClass used to create the persistentVolumeClaim | `default` |
34-
| `serverStorage.pvc.size` | The size of the persistent volume to be created | `5Gi` |
35-
| `networking.serviceType` | The type of service e.g `NodePort`, `LoadBalancer` or `ClusterIP` | `LoadBalancer` |
36-
| `networking.gamePort` | The UDP start port the server will listen on | `2456` |
37-
| `networking.nodePort` | When service type is `NodePort`, assign a fixed UDP port to the server | `""` |
38-
| `networking.publishQueryPort` | Expose the Steam query port (gamePort + 1) | `true` |
39-
| `nodeSelector` | | `{}` |
40-
| `image.repository` | Specifies container image repository | `lloesche/valheim-server` |
41-
| `image.tag` | Specifies container image tag | `latest` |
22+
| Parameter | Description | Default |
23+
| :----------------------------------- | :--------------------------------------------------------------------- | :------------------------ |
24+
| `worldName` | Prefix of the world files to use (will make new if missing) | `example-world-name` |
25+
| `serverName` | Server name displayed in the server browser(s) | `example-server-name` |
26+
| `password` | Server password | `password` |
27+
| `storage.kind` | Storage strategy/soln used to provide the game-server with persistence | `hostvol` |
28+
| `storage.hostvol.path` | The folder to be mounted into /config in the game-server pod | `/data/valheim` |
29+
| `storage.pvc.storageClassName` | The storageClass used to create the persistentVolumeClaim | `default` |
30+
| `storage.pvc.size` | The size of the persistent volume to be created | `1Gi` |
31+
| `serverStorage.kind` | Storage strategy/soln used to save the server installation files | `hostvol` |
32+
| `serverStorage.hostvol.path` | The folder to be mounted into /opt/valheim in the game-server pod | `/data/valheim-server` |
33+
| `serverStorage.pvc.storageClassName` | The storageClass used to create the persistentVolumeClaim | `default` |
34+
| `serverStorage.pvc.size` | The size of the persistent volume to be created | `5Gi` |
35+
| `networking.serviceType` | The type of service e.g `NodePort`, `LoadBalancer` or `ClusterIP` | `LoadBalancer` |
36+
| `networking.gamePort` | The UDP start port the server will listen on | `2456` |
37+
| `networking.nodePort` | When service type is `NodePort`, assign a fixed UDP port to the server | `""` |
38+
| `networking.publishQueryPort` | Expose the Steam query port (gamePort + 1) | `true` |
39+
| `nodeSelector` | | `{}` |
40+
| `tolerations` | | `[]` |
41+
| `image.repository` | Specifies container image repository | `lloesche/valheim-server` |
42+
| `image.tag` | Specifies container image tag | `latest` |
4243

4344
## Persistence
4445

@@ -51,6 +52,7 @@ You can enable persistence for both the server data (your worlds, mounted at `/c
5152
Note: If you are deploying to a cloud provider it is highly recommended that you use a PVC powered by a cloud-specific storageClass. Otherwise you risk losing your world.
5253

5354
On the node you wish to use make sure the folder you are mounting exists (ideally empty if you are starting a new world). Once you spin up the game pod you should see the following files created:
55+
5456
```bash
5557
$ ls /data/valheim
5658
adminlist.txt backups bannedlist.txt permittedlist.txt prefs worlds
@@ -64,26 +66,29 @@ Once you have your StorageClass set up, set `storage.kind` to `persistentVolumeC
6466

6567
### Using an existing world
6668

67-
To use an existing world simply set the `worldName` parameter to the name of your world then save the `.db` and `.fwl` files to the directory mounted into the pod. For example, if your world is named `myworld` then set `worldName: myworld` in your values file (or `--set worldName=myworld`) and assuming you are mounting at `/data/valheim` then your directory should look like:
69+
To use an existing world simply set the `worldName` parameter to the name of your world then save the `.db` and `.fwl` files to the directory mounted into the pod. For example, if your world is named `myworld` then set `worldName: myworld` in your values file (or `--set worldName=myworld`) and assuming you are mounting at `/data/valheim` then your directory should look like:
70+
6871
```bash
6972
$ ls /data/valheim/worlds/
7073
myworld.db myworld.fwl
7174
```
7275

7376
## Connecting to your world
7477

75-
Assuming you have taken care of the networking (port-forwarding if needed, LoadBalancer IP is created, ...):
76-
* In the steam UI (NOT IN GAME) go to view->servers->add favorite
77-
* set the port to 2457 ([reason for that here](https://github.com/lloesche/valheim-server-docker/discussions/32#discussioncomment-371306))
78-
* To connect double click the server in the steam servers explorer
79-
* You will be asked for the password in the steam ui and in game
78+
Assuming you have taken care of the networking (port-forwarding if needed, LoadBalancer IP is created, ...):
79+
80+
- In the steam UI (NOT IN GAME) go to view->servers->add favorite
81+
- set the port to 2457 ([reason for that here](https://github.com/lloesche/valheim-server-docker/discussions/32#discussioncomment-371306))
82+
- To connect double click the server in the steam servers explorer
83+
- You will be asked for the password in the steam ui and in game
8084

8185
More visual set of instructions [here](https://github.com/mbround18/valheim-docker/discussions/51)
8286

8387
## Potential future updates
8488

8589
If there is interest I can hash out the following:
86-
* Cronjob to save backups to s3, blob storage, or minio
87-
* Then clear up the space in the hostvol/pvc
88-
* More persistence options, namely for those looking to run this on the cloud
89-
* I'm familiar with Azure and AWS but I'm sure GCP and others will be fairly simple to figure out if we have testers
90+
91+
- Cronjob to save backups to s3, blob storage, or minio
92+
- Then clear up the space in the hostvol/pvc
93+
- More persistence options, namely for those looking to run this on the cloud
94+
- I'm familiar with Azure and AWS but I'm sure GCP and others will be fairly simple to figure out if we have testers

chart/Chart.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
apiVersion: v2
22
name: valheim-k8s
33
description: Basic chart for deploying valheim to a k8s homelab
4+
icon: https://www.google.com/url?sa=i&url=https%3A%2F%2Fstore.steampowered.com%2Fapp%2F892970%2FValheim%2F&psig=AOvVaw1MMOQJzse-eyruGtGG0DEs&ust=1641045420126000&source=images&cd=vfe&ved=0CAsQjRxqFwoTCIDmhd2YjvUCFQAAAAAdAAAAABAJ
45
type: application
56
version: 0.2.0
6-
appVersion: 1.16.0
7+
appVersion: 1.16.0

chart/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ spec:
1717
nodeSelector:
1818
{{- toYaml . | nindent 8 }}
1919
{{- end }}
20+
{{- with .Values.tolerations }}
21+
tolerations:
22+
{{- toYaml . | nindent 8 }}
23+
{{- end }}
2024
containers:
2125
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
2226
name: valheim-server

chart/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ networking:
3030

3131

3232
nodeSelector: {}
33+
34+
tolerations: {}
35+
3336

3437
# resources:
3538
# requests:

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.4
1+
1.0.5

0 commit comments

Comments
 (0)