Skip to content
Open
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/openab/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ spec:
{{- if $pvcEnabled }}
- name: data
persistentVolumeClaim:
claimName: {{ include "openab.agentFullname" $d }}
claimName: {{ (and $cfg.persistence $cfg.persistence.existingClaim) | default (include "openab.agentFullname" $d) }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 3 additions & 1 deletion charts/openab/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- range $name, $cfg := .Values.agents }}
{{- if ne (include "openab.agentEnabled" $cfg) "false" }}
{{- if not (eq (include "openab.persistenceEnabled" $cfg) "false") }}
{{- if and (not (eq (include "openab.persistenceEnabled" $cfg) "false")) (not (and $cfg.persistence $cfg.persistence.existingClaim)) }}
{{- $d := dict "ctx" $ "agent" $name "cfg" $cfg }}
---
apiVersion: v1
Expand All @@ -9,6 +9,8 @@ metadata:
name: {{ include "openab.agentFullname" $d }}
labels:
{{- include "openab.labels" $d | nindent 4 }}
annotations:
"helm.sh/resource-policy": keep
spec:
accessModes:
- ReadWriteOnce
Expand Down
2 changes: 2 additions & 0 deletions charts/openab/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ agents:
# removeAfterReply: false
# persistence:
# enabled: true
# existingClaim: "" # set to reuse an existing PVC (skips PVC creation)
# storageClass: ""
# size: 1Gi
# agentsMd: ""
Expand Down Expand Up @@ -68,6 +69,7 @@ agents:
removeAfterReply: false
persistence:
enabled: true
existingClaim: "" # set to reuse an existing PVC (skips PVC creation)
storageClass: ""
size: 1Gi # defaults to 1Gi if not set
agentsMd: ""
Expand Down