Skip to content

Commit

Permalink
feat(helm): add annotations to Service, generate docs using helm-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Trojan295 committed Feb 23, 2024
1 parent 26f5bf6 commit 48fb3b1
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 21 deletions.
30 changes: 30 additions & 0 deletions helm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# enshrouded-dedicated-server

![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square)

Enshrouded dedicated server.

**Homepage:** <https://enshrouded.com/>

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| config.gamePort | int | `15636` | |
| config.queryPort | int | `15637` | |
| config.serverName | string | `"Enshrouded Server"` | Server name |
| config.serverPassword | string | `""` | Server password. If not set, password will be generated randomly. |
| config.serverPasswordExistingSecretName | string | `""` | Existing secret name for server password. Must contain key named "password". If set `serverPassword` will be ignored. |
| config.serverSlots | int | `16` | Number of server slots |
| image.repository | string | `"sknnr/enshrouded-dedicated-server"` | |
| image.tag | string | `"v2.0.5"` | |
| resources.requests.cpu | float | `4` | |
| resources.requests.memory | string | `"12G"` | |
| service.annotations | object | `{}` | |
| service.externalIPs | list | `[]` | |
| service.type | string | `"LoadBalancer"` | |
| volumes.dataPVC.size | string | `"50Gi"` | Size of the persistent volume |
| volumes.storageClassName | string | `""` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
29 changes: 8 additions & 21 deletions helm/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,28 @@ metadata:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
{{- with .Values.service.annotations }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- with .Values.service.externalIPs }}
externalIPs: {{ . | toYaml | nindent 4 }}
{{- end }}
ports:
{{- if eq "LoadBalancer" .Values.service.type }}
- name: game-port
port: {{ .Values.config.gamePort | int }}
targetPort: game-port
protocol: UDP
- name: query-port
port: {{ .Values.config.queryPort | int }}
targetPort: query-port
protocol: UDP
{{- else if eq "NodePort" .Values.service.type }}
- name: game-port
port: {{ .Values.config.gamePort | int }}
targetPort: game-port
{{- if eq .Values.service.type "NodePort" }}
nodePort: {{ .Values.config.gamePort | int }}
protocol: UDP
{{- end }}
- name: query-port
port: {{ .Values.config.queryPort | int }}
targetPort: query-port
nodePort: {{ .Values.config.queryPort | int }}
protocol: UDP
{{- else }}
- name: game-port
port: {{ .Values.config.gamePort | int }}
targetPort: game-port
protocol: UDP
- name: query-port
port: {{ .Values.config.queryPort | int }}
targetPort: query-port
protocol: UDP
{{- end }}
{{- if eq .Values.service.type "NodePort" }}
nodePort: {{ .Values.config.queryPort| int }}
{{- end }}
selector:
app: "{{ .Chart.Name }}"
6 changes: 6 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ image:
service:
type: LoadBalancer
externalIPs: []
annotations: {}

resources:
requests:
Expand All @@ -13,13 +14,18 @@ resources:

volumes:
dataPVC:
# -- Size of the persistent volume
size: 50Gi
storageClassName: ""

config:
# -- Server name
serverName: "Enshrouded Server"
# -- Server password. If not set, password will be generated randomly.
serverPassword: ""
# -- Existing secret name for server password. Must contain key named "password". If set `serverPassword` will be ignored.
serverPasswordExistingSecretName: ""
gamePort: 15636
queryPort: 15637
# -- Number of server slots
serverSlots: 16

0 comments on commit 48fb3b1

Please sign in to comment.