Skip to content

Commit

Permalink
feat: Add PVC support
Browse files Browse the repository at this point in the history
  • Loading branch information
B&R committed Mar 4, 2023
1 parent e8e2e25 commit a4163bf
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions charts/humhub/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{ if .Values.pvc.create }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "humhub.pvcName" . }}
annotations:
argocd.argoproj.io/sync-options: Prune=false
finalizers:
- kubernetes.io/pvc-protection
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.pvc.size }}
{{- if .Values.pvc.className }}
storageClassName: {{ .Values.pvc.className }}
{{- end }}
volumeMode: Filesystem
volumeName: {{ .Values.pvc.volumeName }}
{{- end }}
15 changes: 15 additions & 0 deletions charts/humhub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,24 @@ tolerations: []
# -- Groups pods by nodes. Keep them together or separated
affinity: {}

# -- Persistence
pvc:
# -- Should the Helm Chart create PersistentVolumeClaim object?
create: true

# -- PVC name
name: humhub-pv

# -- PVC size (valid only if .pvc.create = true)
size: 10Gi

# -- PV class name (valid only if .pvc.create = true)
#className: local-path

# -- Existing PV name (valid only if .pvc.create = true)
volumeName: "humhub"


defaults:
podSecurityContext:
fsGroup: 101
Expand Down

0 comments on commit a4163bf

Please sign in to comment.