diff --git a/helm/README.md b/helm/README.md new file mode 100644 index 0000000..384c7f8 --- /dev/null +++ b/helm/README.md @@ -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:** + +## 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) diff --git a/helm/templates/service.yaml b/helm/templates/service.yaml index a376986..b80308f 100644 --- a/helm/templates/service.yaml +++ b/helm/templates/service.yaml @@ -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 }}" diff --git a/helm/values.yaml b/helm/values.yaml index 4f5db0e..44865b9 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -5,6 +5,7 @@ image: service: type: LoadBalancer externalIPs: [] + annotations: {} resources: requests: @@ -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