feat: Add persistence configuration to Helm chart for card image caching and update image repository and tag.
All checks were successful
Build and Deploy / build (push) Successful in 1m19s

This commit is contained in:
2025-12-14 23:07:36 +01:00
parent 53553aae0a
commit 6dc69dd22a
4 changed files with 45 additions and 3 deletions

View File

@@ -45,6 +45,11 @@ spec:
httpGet:
path: /api/health
port: http
volumeMounts:
{{- if .Values.persistence.enabled }}
- name: cards-storage
mountPath: {{ .Values.persistence.mountPath }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
@@ -59,3 +64,9 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
{{- if .Values.persistence.enabled }}
- name: cards-storage
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default (include "mtg-draft-maker.fullname" .) }}
{{- end }}

View File

@@ -0,0 +1,21 @@
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "mtg-draft-maker.fullname" . }}
labels:
{{- include "mtg-draft-maker.labels" . | nindent 4 }}
spec:
accessModes:
- {{ .Values.persistence.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- if .Values.persistence.storageClass }}
{{- if (eq "-" .Values.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- end }}

View File

@@ -5,10 +5,10 @@
replicaCount: 1
image:
repository: mtg-draft-maker
repository: git.commandware.com/services/mtg-online-drafter
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"
tag: "main"
imagePullSecrets: []
nameOverride: ""
@@ -75,6 +75,15 @@ autoscaling:
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
persistence:
enabled: false
storageClass: "-"
accessMode: ReadWriteOnce
size: 1Gi
mountPath: /app/server/public/cards
## If you want to use an existing claim, set this:
# existingClaim: my-claim
nodeSelector: {}
tolerations: []