Skip to content

Commit

Permalink
feat: added support and examples of implementing mods
Browse files Browse the repository at this point in the history
  • Loading branch information
brittonhayes committed Mar 22, 2023
1 parent 0c4ced5 commit d6ea85e
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 6 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,20 @@ resources:
memory: 4G
```
Add mods to your server
```yaml
# Adding mods
config:
mods:
- modId: "59A30ACC02650E71"
name: "Night Vision System"
version: "1.1.3"
- modId: "5A64DE35CCD36695"
name: "3rd Ranger Battalion Modpack"
version: "0.7.11"
```
# Acknowledgements
- Helm chart design heavily based on the work by [fbuchmeier](https://github.com/fbuchmeier)
Expand Down
7 changes: 6 additions & 1 deletion Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,14 @@ tasks:
helm:
desc: Execute helm template and documentation generation
cmds:
- helm template arma-reforger {{ .ChartPath }} | kubeconform -summary
- task: helm:tpl
- helm-docs -c {{ .ChartPath }}

helm:tpl:
desc: Execute helm template
cmds:
- helm template arma-reforger {{ .ChartPath }} --values {{ .ValuesFile }}

helm:install:
desc: Install helm chart to cluster
cmds:
Expand Down
2 changes: 1 addition & 1 deletion charts/arma-reforger/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type: application
maintainers:
- name: Britton Hayes
url: https://github.com/brittonhayes
version: 0.2.0
version: 0.3.0
appVersion: "1.16.0"
keywords:
- arma-reforger
Expand Down
4 changes: 2 additions & 2 deletions charts/arma-reforger/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# arma-reforger

![Version: 0.1.9](https://img.shields.io/badge/Version-0.1.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)

A Helm chart for ARMA reforger on LinuxGSM.

Expand Down Expand Up @@ -29,7 +29,7 @@ A Helm chart for ARMA reforger on LinuxGSM.
| config.gameHostRegisterBindAddress | string | `"0.0.0.0"` | When left out or empty, an attempt is made to automatically determine the IP address, but this will often fail and should not be relied upon as the server might not be reachable from public networks. |
| config.gameHostRegisterBindPort | int | `2001` | Otherwise, this is the UDP port that is forwarded to the server. |
| config.maxFPS | int | `60` | otherwise, the server can try to use all the available resources! |
| config.mods | list | `[]` | List of mods |
| config.mods | list | `[]` | version: "0.7.11" |
| config.name | string | `"arma-reforger-server.example.com"` | length 0..100 characters |
| config.networkViewDistance | int | `500` | Maximum network streaming range of replicated entities. |
| config.playerCountLimit | int | `20` | Set the maximum amount of players on the server. |
Expand Down
10 changes: 10 additions & 0 deletions charts/arma-reforger/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,13 @@ noLookupWhenTemplating
noLookupWhenTemplating
{{- end -}}
{{- end -}}

{{- define "mods" -}}
{{- if .Values.config.mods -}}
{{ $first := true }}
{{- range $v := .Values.config.mods }}
{{- if $first}}{{$first = false}}{{else}},{{end -}}
{ "modId": {{ $v.modId | quote }}, "name": {{ $v.name | quote }}, "version": {{ $v.version | quote }} }
{{- end }}
{{- end }}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/arma-reforger/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ data:
"fastValidation": {{ .Values.config.fastvalidation }},
"battlEye": {{ .Values.config.battleeye }}
},
"mods": []
"mods": [{{ include "mods" . }}]
},
"a2sQueryEnabled": true,
"steamQueryPort": 17777
Expand Down
9 changes: 8 additions & 1 deletion charts/arma-reforger/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,14 @@ config:
# -- List of administrators
admins: []

# -- List of mods
# -- Array of mods to load in the format
# -- mods:
# -- - modId: "59A30ACC02650E71"
# -- name: "Night Vision System"
# -- version: "1.1.3"
# -- - modId: "5A64DE35CCD36695"
# -- name: "3rd Ranger Battalion Modpack"
# -- version: "0.7.11"
mods: []

# -- array value, default: ["PLATFORM_PC"]
Expand Down

0 comments on commit d6ea85e

Please sign in to comment.