Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: retain pvc #84

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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