- Now supports a external PVC to be attached to the container;

- Added parameters to include a external PVC;
This commit is contained in:
Filipe Souza
2024-01-25 00:43:55 -03:00
parent 2fdb55f4dd
commit 3f00d4ad0d
4 changed files with 14 additions and 2 deletions

View File

@@ -54,7 +54,9 @@ This chart can provide an rAthena emulator installation on a Kubernetes cluster.
| 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 | `{"preventDelete":false,"size":"10Gi","storageClassName":""}` | Define some parameters for the storage volume |
| server.storage | dict | `{"external":false,"externalName":"","preventDelete":false,"size":"10Gi","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.storageClassName | string | `""` | The storage class name. |

View File

@@ -55,4 +55,8 @@ spec:
volumes:
- name: datadir
persistentVolumeClaim:
{{- if not .Values.server.storage.external }}
claimName: "{{ .Release.Name }}-datadir-pvc"
{{ else }}
claimName: "{{ .Values.server.storage.externalName }}"
{{ end }}

View File

@@ -1,3 +1,4 @@
{{- if not .Values.server.storage.external }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
@@ -26,4 +27,5 @@ spec:
resources:
requests:
storage: {{ .Values.server.storage.size }}
storageClassName: {{ .Values.server.storage.storageClassName }}
storageClassName: {{ .Values.server.storage.storageClassName }}
{{ end }}

View File

@@ -9,6 +9,10 @@ server:
labels: { }
# -- (dict) Define some parameters for the storage volume
storage:
# -- (bool) Define if it will use an existing PVC containing the installation data.
external: false
# -- (bool) The external PVC name to use.
externalName: ""
# -- Keeps helm from deleting the PVC. By default, helm does not delete pvcs.
preventDelete: false
# -- The size of the pvc storage.