Skip to content

Commit

Permalink
Mirror Plugin Chart: Add optional scratch pvc for downloads (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikaneshiro authored Mar 27, 2024
1 parent 5980744 commit 08d12a1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions charts/beskar-mirror/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ Create the name of the service account to use
readOnly: true
{{- end }}

{{- if .Values.persistence.scratch.enabled }}
- name: scratch
mountPath: /scratch
{{- end }}

{{- with .Values.extraVolumeMounts }}
{{ toYaml . }}
{{- end }}
Expand Down
14 changes: 14 additions & 0 deletions charts/beskar-mirror/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,17 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes: {{ include "beskar-mirror.volumes" . | nindent 8 }}
{{- if .Values.persistence.scratch.enabled }}
volumeClaimTemplates:
- metadata:
name: scratch
spec:
accessModes:
- {{ .Values.persistence.scratch.accessMode | quote }}
{{- if .Values.persistence.scratch.storageClassName }}
storageClassName: {{ .Values.persistence.scratch.storageClassName }}
{{- end }}
resources:
requests:
storage: {{ .Values.persistence.scratch.size | quote }}
{{- end }}
5 changes: 5 additions & 0 deletions charts/beskar-mirror/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ persistence:
enabled: false
size: 10Gi
# storageClass: '-'
scratch:
accessMode: 'ReadWriteOnce'
enabled: false
size: 10Gi
# storageClass: '-'

secrets:
registry:
Expand Down

0 comments on commit 08d12a1

Please sign in to comment.