Skip to content

Commit

Permalink
fix(persistence): remove server persistence
Browse files Browse the repository at this point in the history
  • Loading branch information
joaop221 committed Jul 20, 2024
1 parent 1fc5ab2 commit f44dc7e
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 58 deletions.
2 changes: 1 addition & 1 deletion charts/v-rising/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.11.0
version: 0.12.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
10 changes: 7 additions & 3 deletions charts/v-rising/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ This Helm chart provides default values for deploying the v-rising application.
| `serviceAccount.annotations` | Annotations to add to the service account (empty in this case). | `{}` (empty object) |
| `serviceAccount.name` | Name of the service account (empty in this case, auto-generated). | `""` (empty string) |
| `podAnnotations` | Annotations to add to the pods (empty in this case). | `{}` (empty object) |
| `podSecurityContext.fsGroup` | Group ID for the pod security context. | `1001` |
| `securityContext.runAsNonRoot` | Whether to run the container as a non-root user. | `true` |
| `securityContext.runAsUser` | User ID for the container security context. | `1001` |
| `podSecurityContext` | Pod security context. | `{}` (empty object) |
| `securityContext.allowPrivilegeEscalation` | Whether to allow privilege escalation for pods. | `false` |
| `securityContext.capabilities.drop` | Capabilities to drop for the container. | `ALL` |
| `securityContext.runAsNonRoot` | Whether to run the container as a non-root user. | `true` |
| `securityContext.runAsGroup` | Group ID for the container security context. | `1001` |
| `securityContext.runAsUser` | User ID for the container security context. | `1001` |
| `securityContext.seccompProfile.type` | Seccomp profile type for the container. | `RuntimeDefault` |
| `service.annotations` | Annotations for the Kubernetes service (empty in this case). | `{}` (empty object) |
| `service.type` | Type of Kubernetes service for v-rising. | `ClusterIP` |
| `service.gamePort` | Port for the game service. | `9876` |
Expand Down
15 changes: 3 additions & 12 deletions charts/v-rising/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,12 @@ spec:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: v-server
{{- if .Values.persistence.server.enabled }}
persistentVolumeClaim:
{{- if .Values.persistence.server.existingClaim }}
claimName: {{ .Values.persistence.server.existingClaim }}
{{- else }}
claimName: {{ include "v-rising.fullname" . }}-server
{{- end }}
{{- else }}
emptyDir: {}
{{- end }}
- name: v-data
{{- if .Values.persistence.data.enabled }}
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
{{- if .Values.persistence.data.existingClaim }}
claimName: {{ .Values.persistence.data.existingClaim }}
{{- if .Values.persistence.existingClaim }}
claimName: {{ .Values.persistence.existingClaim }}
{{- else }}
claimName: {{ include "v-rising.fullname" . }}
{{- end }}
Expand Down
15 changes: 0 additions & 15 deletions charts/v-rising/templates/pvc-data.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions charts/v-rising/templates/pvc-server.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions charts/v-rising/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if and (.Values.persistence).enabled (not .Values.persistence.existingClaim) -}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "v-rising.fullname" . }}
labels:
{{- include "v-rising.labels" . | nindent 4 }}
spec:
storageClassName: {{ .Values.persistence.storageClass }}
accessModes:
- {{ .Values.persistence.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- end }}
17 changes: 5 additions & 12 deletions charts/v-rising/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,11 @@ ingressRoute:
resources: {}

persistence:
data:
enabled: true
existingClaim: ""
storageClass: ""
accessMode: "ReadWriteOnce"
size: 10Gi
server:
enabled: false
existingClaim: ""
storageClass: ""
accessMode: "ReadWriteOnce"
size: 10Gi
enabled: true
existingClaim: ""
storageClass: ""
accessMode: "ReadWriteOnce"
size: 10Gi

config:
TZ: America/Sao_Paulo
Expand Down

0 comments on commit f44dc7e

Please sign in to comment.