Skip to content

Commit

Permalink
feat: retain
Browse files Browse the repository at this point in the history
  • Loading branch information
shahargl committed Nov 29, 2024
1 parent 8d8f8db commit fad5ae8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/keep/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: keep
version: 0.1.43
version: 0.1.44
description: Keep Helm Chart
type: application
icon: https://platform.keephq.dev/_next/image?url=%2Fkeep.png&w=48&q=75
Expand Down
8 changes: 6 additions & 2 deletions charts/keep/templates/db-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ $pvcName }}
annotations:
{{- if .Values.database.pvc.retain }}
helm.sh/resource-policy: keep
{{- end }}
spec:
accessModes:
- ReadWriteOnce
{{- if $existingPvc }}
# Use existing PVC spec
{{- toYaml $existingPvc.spec | nindent 2 }}
{{- else }}
# Define new PVC spec
accessModes:
- ReadWriteOnce
{{- if .Values.database.pvc.storageClass }}
storageClassName: {{ .Values.database.pvc.storageClass }}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions charts/keep/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ database:
enabled: true
size: 5Gi
storageClass: ""
retain: false
image:
repository: mysql
pullPolicy: IfNotPresent
Expand Down

0 comments on commit fad5ae8

Please sign in to comment.