Skip to content

Commit ccdc353

Browse files
authored
Merge pull request #73 from SQLJames/cleanup
Cleanup
2 parents 473b334 + c8b7ddc commit ccdc353

13 files changed

+1383
-308
lines changed

.editorconfig

-12
This file was deleted.

.github/workflows/chart_workflow.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Lint, Test and Deploy Charts
22
on:
33
push:
4-
pull_request:
54

65
jobs:
76
lint-test:

.github/workflows/verify_readme.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Verify Chart Documentation
2+
on:
3+
push:
4+
5+
jobs:
6+
verify-docs:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v3
12+
- name: Install Golang
13+
uses: actions/setup-go@v5
14+
with:
15+
go-version: 'stable'
16+
- name: install chart-doc-gen
17+
run: go install kubepack.dev/chart-doc-gen@latest
18+
- name: Set up dependencies
19+
run: |
20+
sudo apt-get update
21+
sudo apt-get install -y make
22+
# Install chart-doc-gen or add additional commands as needed
23+
24+
- name: Generate Documentation
25+
run: make gen
26+
27+
- name: Verify Documentation
28+
run: make verify
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Verify Chart Schema
2+
on:
3+
push:
4+
5+
jobs:
6+
verify-schema:
7+
name: "Verify Chart Schema"
8+
runs-on: ubuntu-22.04
9+
steps:
10+
- name: "Checkout"
11+
uses: actions/checkout@v2.4.2
12+
with:
13+
fetch-depth: 0
14+
15+
- name: "Set Up Helm"
16+
uses: azure/setup-helm@v3.3
17+
if: github.ref != 'refs/heads/main'
18+
with:
19+
version: v3.4.1
20+
- name: install helm-schema-gen
21+
run: helm plugin install https://github.com/karuppiah7890/helm-schema-gen.git
22+
- name: Set up dependencies
23+
run: |
24+
sudo apt-get update
25+
sudo apt-get install -y make
26+
# Install chart-doc-gen or add additional commands as needed
27+
28+
- name: Generate Documentation
29+
run: make gen-schema
30+
31+
- name: Verify Documentation
32+
run: make verify

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
## Changelog
22

3+
### V2.5.1
4+
5+
#### Non-Breaking Changes
6+
- Updating values.schema.json
7+
- Updating Readme documentation
8+
- Adding new github workflow to verify readme documentation is up to date going forward
9+
- Removed unneeded files from the repository
10+
- Removed changelog entries from the main readme
11+
- Added values.schema.json workflow to make sure schema json is up to date going forward
12+
313
### V2.5.0
414

515
#### Breaking Changes

README.md

+1-20
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,4 @@ chart's [README.md](https://github.com/SQLJames/factorio-server-charts/blob/main
3636
## Examples Of Large mods
3737

3838
Values.yaml configuration of large [mods](./examples/):
39-
* [Space-Exploration](https://mods.factorio.com/mod/space-exploration)
40-
41-
## Changelog
42-
43-
### V1.1.0
44-
45-
#### Breaking Changes
46-
47-
- Moved account data from `server_settings.` to `account.` in values.yaml
48-
- Moved server password from `server_settings.` to `serverPassword.` in values.yaml
49-
50-
#### Non-Breaking Changes
51-
52-
- Added `account.accountSecret` field to values.yaml
53-
- Added `rcon.passwordSecret` field to values.yaml
54-
- Added `serverPassword.passwordSecret` field to values.yaml
55-
- Changed default `rcon.password` to `CHANGEMECHANGEME`, which should be changed anyway
56-
- Changed default `map_gen_settings.autoplace_controls` from the standard values to `{}`, since by default map
57-
generation follows standard parameters if not overriden
58-
- Changed default `admin_list`, `white_list` and `ban_list` to `[]` instead of `nil`
39+
* [Space-Exploration](https://mods.factorio.com/mod/space-exploration)

charts/factorio-server-charts/Chart.yaml

+1-1
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: 2.5.0
23+
version: 2.5.1
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/README.md

+261-231
Large diffs are not rendered by default.

charts/factorio-server-charts/doc.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ project:
55
description: A Helm chart for running factorio in kubernetes
66
app: Factorio
77
repository:
8-
url: https://github.com/SQLJames/factorio-server-charts
9-
name: github
8+
url: https://sqljames.github.io/factorio-server-charts
9+
name: factorio
1010
chart:
1111
name: factorio-server-charts
12-
version: 1.2.4
1312
values: "-- generate from values file --"
1413
valuesExample: "-- generate from values file --"
1514
release:
+169
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/factorio-server-charts)](https://artifacthub.io/packages/search?repo=factorio-server-charts)
2+
[![Factorio](https://img.shields.io/static/v1?label=Factorio&message=v2.0.10&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAACPtJREFUeJzVVglQVFcWbZYGBJHNBruhaWjo5f/f3XQD3c2ibMKggoJBowKyNluDLBJXBI2OCyEqronjBokCyqKiuIABjWabKSuJM6k4i5OqmFgxiZPJJMRlxDMXo0nLSKbKyaRqXtWpX//V//ec99699zwe7/9xvLtuildXWUhhU1FQQd1sNtnD2T6ApscRrH4RAR83xNRc22DEx+v1eG+V8U6Qv8dOml5EKCHMIcQRxv4cXNZPmvzkhei+C8v1eLsmBANLDDAGiDppepUF6gjSp2a9uikh4fUVEa1y4bgaejUR5hKSQyXjpvQuCMn57Yrom50FHHpKOHTkKhGvlFwYIWAY6qciv7k9Nu+rjcZvvtwahVdKDdcnc17NVXHebQPl7OU/1QZ/9YelxqH24nAcTFehZR6LprkcTLHq2zNjZO9qZYJ9VlbfC+DbWGUumiovSw9XLKT3WEIwQU6wG5X8ytYUwScNEYOfE/nvVkeix6zGvvmau5cW64cuL9bjwqJIdJaFoTk/GE05QfjNHAaNqQqsT+XQatLhVFXwnZ1ZqveyjcKWzkLu0uGi0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i+xvprlhPbTg+yA9aqfgG38Z63UPySp6lEf2bgGCx9RSd/Dmpp9vwh/EEzVh7vr+/l3sJ4+P1tkEiuGuOC0BxhBgmgzeMvm4QCTwg9HC7JXBxvkrfHne3tzmeqvX6KpyRgPUT3xG6u56gONW872/W40cl/09DJ/FwSJS6HN6bRW06m3yCnjF+Lt85O9ifoETbzvuxVecxXo4pQf4TzonHuw37BUNwfGpiy5GuEy6pI2NZlRKIlTMCofJyGmmztbyfuvH8t6NqKjvTwEjBSiVg/MUQOI8ZvmgMd7YcQgzBjzfalfvnGKkRnItW7j9HIfGuZPzE1S6ODhE07f4/I/wlxr8AAkgaqTYaX18AAAAASUVORK5CYII=&labelColor=4c2c2c&color=8c6c6c)](https://www.factorio.com/)
3+
[![Chart Version](https://img.shields.io/static/v1?logo=Helm&logoColor=0f1689&message=v1.1.0&label=Helm%20Chart&labelColor=eeeeee&color=fefefe)](https://sqljames.github.io/factorio-server-charts/index.yaml)
4+
[![Image Version](https://img.shields.io/static/v1?logo=Docker&message=v1.1.70&label=Docker%20Image&labelColor=eeeeee&color=fefefe)](https://sqljames.github.io/factorio-server-charts/index.yaml)
5+
6+
# {{ .Project.ShortName }}
7+
8+
[{{ .Project.Name }}]({{ .Project.URL }}) - {{ .Project.Description }}
9+
10+
## TL;DR;
11+
12+
```bash
13+
$ helm repo add {{ .Repository.Name }} {{ .Repository.URL }}
14+
$ helm repo update
15+
$ helm search repo {{ .Repository.Name }}/{{ .Chart.Name }}
16+
$ helm upgrade -i {{ .Release.Name }} {{ .Repository.Name }}/{{ .Chart.Name }} -n {{ .Release.Namespace }} --create-namespace
17+
```
18+
19+
## Introduction
20+
21+
This chart deploys {{ .Project.App }} on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
22+
23+
## Prerequisites
24+
{{ range .Prerequisites }}
25+
- {{ . }}
26+
{{- end }}
27+
28+
## Installing the Chart
29+
30+
To install/upgrade the chart with the release name `{{ .Release.Name }}`:
31+
32+
```bash
33+
$ helm upgrade -i {{ .Release.Name }} {{ .Repository.Name }}/{{ .Chart.Name }} -n {{ .Release.Namespace }} --create-namespace
34+
```
35+
36+
The command deploys {{ .Project.App }} on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
37+
38+
> **Tip**: List all releases using `helm list`
39+
40+
## Uninstalling the Chart
41+
42+
To uninstall the `{{ .Release.Name }}`:
43+
44+
```bash
45+
$ helm uninstall {{ .Release.Name }} -n {{ .Release.Namespace }}
46+
```
47+
48+
The command removes all the Kubernetes components associated with the chart and deletes the release.
49+
50+
## Importing a save file
51+
52+
> :warning: Importing a save file will **OVERWRITE THE SERVER SAVEFILE** with the name specified in `factorioServer.save_name`. Import with caution!
53+
54+
### Importing by URL
55+
56+
To import your save file from a URL, set `import_save.source_url` to a direct-download link for your savegame. By default, the file will be downloaded and imported only once.
57+
58+
If, on pod intialization, you wish to re-import the file every time the contents of the savegame change, set `import_save.reimport_on_change` to `true`.
59+
:warning: If the savegame at the source url changes, this will overwrite the server save with that file. Use with caution!
60+
61+
If you wish to reimport the save file every time the pod reinitializes, regardless of changes, set `import_save.reimport_every_time` to `true`. This could be useful for demos or testing.
62+
:warning: This will overwrite the server savegame **every time the pod reinitializes**. Use with caution!
63+
64+
### Manual Import
65+
66+
To import an existing save file, start/restart the pod at least once. This will create the import folder structure.
67+
68+
Now, copy the savegame you wish to import to the `/factorio/save-importer/import/<existing_savegame_name>.zip` on the running pod using whatever mechanism you prefer. To do this with kubectl:
69+
70+
```bash
71+
kubectl cp ./my_existing_savegame.zip <namespace>/<pod_name>:/factorio/save-importer/import
72+
```
73+
74+
Restart the pod again to import your save file.
75+
76+
77+
## Installing mods
78+
79+
To Install mods, change `mods.enabled` to `true`, add any offical mods by their URL name under the `mods.portal`
80+
section, and any unofficial mods in the `mods.unofficial`section.
81+
82+
83+
```yaml
84+
mods:
85+
image:
86+
repository: "ghcr.io/sqljames/factorio-mod-downloader"
87+
## Container image pull policy
88+
pullPolicy: Always
89+
## Overrides the image tag whose default is the chart appVersion.
90+
tag: "1.0.1"
91+
## You should set an fix version, i.e.:
92+
# tag: "1.1.37"
93+
enabled: false
94+
# in order to use the mods portal you will need to specify the username and token in the server_settings.
95+
portal: []
96+
# - name: factorissimo-2-notnotmelon
97+
# version: 3.5.11
98+
# unofficial section is meant to just allow you to download and place folders into the mods folder.
99+
# we will not check version compatibility automatically with these downloads.
100+
# you can encounter an error if the file names dont match what the mod is expecting for example
101+
# Error Util.cpp:83: Failed to load mod "Squeak-Through": Filename of mod
102+
# /factorio/mods/Squeak-Through.zip doesn't match the expected Squeak Through_1.8.2.zip (case sensitive!)
103+
unofficial: []
104+
# - url: "https://github.com/Suprcheese/Squeak-Through/archive/refs/tags/1.8.2.zip"
105+
# name: "Squeak Through_1.8.2.zip"
106+
```
107+
If the Factorio server doesn't start, check that the logs don't have an error with the mods. They are pretty verbose.
108+
109+
### Overhaul mods
110+
It is possible that your mod may extend the default settings. As a result, your server might not start properly and instead throw an error.
111+
112+
While we expose all the default settings, we would not be able to determine what is needed if it is absent. To add new settings you would need to convert the desired json file into a yaml struct as we are mounting all configurations as a config map into the container.
113+
114+
For example prior to the official release of 2.0, there was an issue with Space Exploration. The `autoplace_controls` by default is an empty array, and thus we were not able to start the instance as there were no settings for them to evaluate. Additionally, they are also modifying some of the other settings. These changes implement the default recommended settings, available in the UI and were stored in a file at `...Factorio\mods\space-exploration\shared.lua`. In the lua file, it has 2 sections, basic_settings and advanced_settings which correspond to settings in `map-gen-settings.json` and `map-settings.json` respecively.
115+
116+
At the time of writing, to make these changes you would need to add this to your values.yaml file to override their default values in the chart.
117+
118+
> **_NOTE:_** These settings may change and it is important to check with the mod maintainer/community to check the recommended settings.
119+
```
120+
map_settings:
121+
pollution:
122+
enemy_attack_pollution_consumption_modifier: 0.5
123+
enemy_evolution:
124+
time_factor: 0.0000005
125+
destroy_factor: 0.0005
126+
pollution_factor: 0.00000025
127+
128+
map_gen_settings:
129+
water: 1.5
130+
starting_area: 2
131+
autoplace_controls:
132+
hot:
133+
size: 0.5
134+
cold:
135+
size: 0.5
136+
property_expression_names:
137+
control-setting:moisture:bias: '0.05'
138+
control-setting:aux:bias: '-0.35'
139+
```
140+
More information about the debugging process for the space exploration mod can be read on [Issue 24](https://github.com/SQLJames/factorio-server-charts/issues/24).
141+
142+
If you do run into any issues with mods, I will try to work with you on finding the right settings and document them as well.
143+
144+
{{ if .Chart.Values -}}
145+
146+
## Configuration
147+
148+
The following table lists the configurable parameters of the `{{ .Chart.Name }}` chart and their default values.
149+
150+
{{ .Chart.Values }}
151+
152+
Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example:
153+
154+
```bash
155+
$ helm upgrade -i {{ .Release.Name }} {{ .Repository.Name }}/{{ .Chart.Name }} -n {{ .Release.Namespace }} --create-namespace --set {{ .Chart.ValuesExample }}
156+
```
157+
158+
Alternatively, a YAML file that specifies the values for the parameters can be provided while
159+
installing the chart. For example:
160+
161+
```bash
162+
$ helm upgrade -i {{ .Release.Name }} {{ .Repository.Name }}/{{ .Chart.Name }} -n {{ .Release.Namespace }} --create-namespace --values values.yaml
163+
```
164+
{{- end }}
165+
166+
## Releases
167+
168+
Releases are published using the official helm release action in github.
169+
https://github.com/helm/chart-releaser-action

0 commit comments

Comments
 (0)