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
All checks were successful
Build and Deploy / build (push) Successful in 1m19s
This commit is contained in:
@@ -20,8 +20,9 @@
|
||||
- `GameManager.ts`: Renamed unused args in `shuffleLibrary`.
|
||||
- **Helm Chart**: Created a complete Helm chart configuration in `helm/mtg-draft-maker`:
|
||||
- `Chart.yaml`: Defined chart metadata.
|
||||
- `values.yaml`: Configured defaults (Image `mtg-draft-maker:latest`, Port 3000).
|
||||
- `values.yaml`: Configured defaults (Image `git.commandware.com/services/mtg-online-drafter:main`, Port 3000).
|
||||
- `templates/`: Added Deployment, Service, Ingress, and ServiceAccount manifests.
|
||||
- **Persistence**: Added configuration to mount a Persistent Volume Claim (PVC) at `/app/server/public/cards` for storing cached images. Disabled by default.
|
||||
- Linted successfully.
|
||||
|
||||
## Status
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
21
helm/mtg-draft-maker/templates/pvc.yaml
Normal file
21
helm/mtg-draft-maker/templates/pvc.yaml
Normal 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 }}
|
||||
@@ -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: []
|
||||
|
||||
Reference in New Issue
Block a user