Skip to content

feat(helm): support existing PVC via persistence.existingClaim - #11708

Open
knjoroge wants to merge 2 commits into
aquasecurity:mainfrom
knjoroge:feat/helm-existing-claim
Open

knjoroge wants to merge 2 commits into
aquasecurity:mainfrom
knjoroge:feat/helm-existing-claim

Conversation

@knjoroge

@knjoroge knjoroge commented Nov 22, 2026 •

Copy link
Copy Markdown

Description

Adds persistence.existingClaim so the chart can use a PVC that already exists (for example on NFS) instead of creating one per pod.

Before: there's no way to use an existing PVC. Without volumeClaimTemplates, the cache falls back to emptyDir.

After: with --set persistence.existingClaim=my-pvc, no PVC is created and the pod mounts:

- name: data
  persistentVolumeClaim:
    claimName: my-pvc

helm template output is unchanged for the default values and for persistence.enabled=false. helm lint passes.

Notes:

  • Only for replicaCount: 1. Trivy locks its cache (fanal.db), so a second pod on the same claim can't open it.
  • On an existing install, the StatefulSet must be deleted before switching, because volumeClaimTemplates can't be changed. Both points are in the README.

Tested on a kind cluster:

  • ct lint-and-install passes.
  • With existingClaim=my-pvc, the pod runs with the cache on my-pvc, and no other PVC is created.
  • With 2 replicas, the second pod fails with cache may be in use by another process.
  • Upgrading an existing install fails with volumeClaimTemplates ... field is immutable. It works after deleting the StatefulSet.

Related issues

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works. (The chart has no tests to add to. Tested on a kind cluster instead, see above.)
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@knjoroge
knjoroge requested a review from afdesk as a code owner November 22, 2026 21:18
@CLAassistant

CLAassistant commented Nov 22, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants