Skip to content

feat: add persistence.existingClaim support to Helm chart #120

@masami-agent

Description

@masami-agent

Summary

Following up on #117 — the maintainer confirmed the chart rename (agent-brokeropenab) is an intentional breaking change and welcomed a PR for persistence.existingClaim support.

This feature request tracks adding that support so users can seamlessly preserve PVC data across chart renames or reuse existing volumes.

Proposed Changes

1. values.yaml — add existingClaim field

persistence:
  enabled: true
  existingClaim: ""   # set to reuse an existing PVC (skips PVC creation)
  storageClass: ""
  size: 1Gi

2. templates/pvc.yaml — skip creation when existingClaim is set

{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ include "openab.fullname" . }}
  labels:
    {{- include "openab.labels" . | nindent 4 }}
spec:
  accessModes:
    - ReadWriteOnce
  {{- if .Values.persistence.storageClass }}
  storageClassName: {{ .Values.persistence.storageClass }}
  {{- end }}
  resources:
    requests:
      storage: {{ .Values.persistence.size }}
{{- end }}

3. templates/deployment.yaml — use existingClaim in volume

      {{- if .Values.persistence.enabled }}
      - name: data
        persistentVolumeClaim:
          claimName: {{ .Values.persistence.existingClaim | default (include "openab.fullname" .) }}
      {{- end }}

Use Cases

  • Upgrading from agent-broker chart to openab chart while preserving CLI auth and session data
  • Reusing a pre-provisioned PVC in environments with specific storage policies
  • Migrating between release names without data loss

This is a standard Helm chart pattern (used by Bitnami, Grafana, etc.) and would be a small, non-breaking addition.

Happy to submit a PR if this is accepted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurep2Medium — planned work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions