Skip to content

Commit

Permalink
Merge pull request thijsvanloef#162 from Filipe-Souza/optional-health…
Browse files Browse the repository at this point in the history
…z-container

- Modified the chart, now the healthz container/service port is optional
  • Loading branch information
thijsvanloef authored Jan 28, 2024
2 parents 534b120 + 106102c commit 56b2192
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: palworld
version: 0.0.0
version: 0.0.1
description: This chart can provide an rAthena emulator installation on a Kubernetes cluster.
type: application
keywords:
Expand Down
12 changes: 6 additions & 6 deletions chart/VALUES_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# palworld

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

This chart can provide an rAthena emulator installation on a Kubernetes cluster.

Expand Down Expand Up @@ -50,18 +50,18 @@ This chart can provide an rAthena emulator installation on a Kubernetes cluster.
| server.service | dict | | Change the service configuration. If you change those, make sure to change the server.config and server.ports accordingly. |
| server.service.annotations | object | `{}` | Additional annotations to the resources |
| server.service.enabled | bool | `true` | Enables the creation of the service component. |
| server.service.healthz | dict | `{"enabled":false,"name":"healthz","port":80,"protocol":"TCP","targetPort":80}` | The "healthz" definition . Use if you need to create a TCP health check for load balancers on cloud services. |
| server.service.labels | object | `{}` | Additional labels to the resources |
| server.service.ports | dict | | Change the ports to be mapped to the service. If you change those, make sure to change the server.config and server.ports accordingly. |
| server.service.ports[0] | dict | `{"name":"game","port":8211,"protocol":"UDP","targetPort":8211}` | The "game" port definition. If you change this, make sure to change the server.ports.game and server.config.port accordingly. |
| server.service.ports[1] | dict | `{"name":"query","port":27015,"protocol":"UDP","targetPort":27015}` | The "query" port definition . If you change this, make sure to change the server.ports.query and server.config.query_port accordingly. |
| server.service.ports[2] | dict | `{"name":"rcon","port":25575,"protocol":"UDP","targetPort":25575}` | The "rcon" port definition . If you change this, make sure to change the server.ports.rcon and server.config.rcon.port accordingly. |
| server.service.ports[3] | dict | `{"name":"healthz","port":80,"protocol":"TCP","targetPort":80}` | The "healthz" port definition . Used only to create a health check for load balancers on cloud services. |
| server.service.type | string | `"LoadBalancer"` | The type of service to be created. |
| server.storage | dict | `{"external":false,"externalName":"","preventDelete":false,"size":"10Gi","storageClassName":""}` | Define some parameters for the storage volume |
| server.storage | dict | `{"external":false,"externalName":"","preventDelete":false,"size":"12Gi","storageClassName":""}` | Define some parameters for the storage volume |
| server.storage.external | bool | `false` | Define if it will use an existing PVC containing the installation data. |
| server.storage.externalName | bool | `""` | The external PVC name to use. |
| server.storage.preventDelete | bool | `false` | Keeps helm from deleting the PVC. By default, helm does not delete pvcs. |
| server.storage.size | string | `"10Gi"` | The size of the pvc storage. |
| server.storage.size | string | `"12Gi"` | The size of the pvc storage. |
| server.storage.storageClassName | string | `""` | The storage class name. |

----------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions chart/templates/deployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ spec:
{{- end }}
spec:
containers:
{{ if .Values.server.service.healthz.enabled }}
- name: healthz
image: "chussenot/tiny-server:latest"
imagePullPolicy: {{ .Values.server.image.imagePullPolicy }}
ports:
- name: healthz
containerPort: 80
protocol: TCP
{{ end }}
- name: server
image: "{{ .Values.server.image.name }}:{{ .Values.server.image.tag }}"
imagePullPolicy: {{ .Values.server.image.imagePullPolicy }}
Expand Down
6 changes: 6 additions & 0 deletions chart/templates/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ spec:
selector:
app.kubernetes.io/component: "{{ .Release.Name }}-server"
ports:
{{ if .Values.server.service.healthz.enabled }}
- name: {{ .Values.server.service.healthz.name }}
port: {{ .Values.server.service.healthz.port }}
protocol: {{ .Values.server.service.healthz.protocol }}
targetPort: {{ .Values.server.service.healthz.targetPort }}
{{ end }}
{{- with .Values.server.service.ports }}
{{- toYaml . | nindent 4 }}
{{- end }}
Expand Down
14 changes: 8 additions & 6 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ server:
labels: { }
# -- (string) The type of service to be created.
type: LoadBalancer
# -- (dict) The "healthz" definition .
# Use if you need to create a TCP health check for load balancers on cloud services.
healthz:
enabled: false
name: healthz
port: 80
protocol: TCP
targetPort: 80
# -- (dict) Change the ports to be mapped to the service.
# If you change those, make sure to change the server.config and server.ports accordingly.
# @notationType -- bigValue
Expand All @@ -93,12 +101,6 @@ server:
port: 25575
protocol: UDP
targetPort: 25575
# -- (dict) The "healthz" port definition .
# Used only to create a health check for load balancers on cloud services.
- name: healthz
port: 80
protocol: TCP
targetPort: 80
# -- (dict) Change the game server configuration.
# If you change those, make sure to change the service.ports and server.ports accordingly.
# Those are directly connected with the container image, providing multiple environment variables to the scripts.
Expand Down

0 comments on commit 56b2192

Please sign in to comment.