Skip to content

feat(helm): add an option to specify no PVC or a preexisting one#1433

Closed
Gylesie wants to merge 1 commit intoseerr-team:developfrom
Gylesie:helm/enrich-pvc-settings
Closed

feat(helm): add an option to specify no PVC or a preexisting one#1433
Gylesie wants to merge 1 commit intoseerr-team:developfrom
Gylesie:helm/enrich-pvc-settings

Conversation

@Gylesie
Copy link
Copy Markdown
Contributor

@Gylesie Gylesie commented Mar 9, 2025

Description

Adds an option to specify no PVC to be created for the persistence in which case an emptyDir is used as a volume. Also, adds an option to use an existing PVC instead of defining a new one.

I am new to helm templating, my changes were inspired by MoJo2600/pihole-kubernetes chart. Please do check for any mistakes.

Also, I did not know how to regenerate the readme. Maybe it is regenerated as part of CI/CD pipeline? Be free to commit some fixes if need be.

Screenshot (if UI-related)

N/A

To-Dos

  • Regenerate chart's readme

Issues Fixed or Closed

N/A

@Gylesie
Copy link
Copy Markdown
Contributor Author

Gylesie commented Mar 9, 2025

cc @M0NsTeRRR

claimName: {{ include "jellyseerr.configPersistenceName" . }}
claimName: {{ if .Values.config.persistence.existingClaim }}{{ .Values.config.persistence.existingClaim }}{{- else }}{{ include "jellyseerr.configPersistenceName" . }}{{- end }}
{{- else }}
emptyDir: {}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add an empty dir if there is no persistence ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw it having it done like this in the chart I got inspired from. I think it might be slightly more performant rather than relying on the container's writeable layer that utilizes Copy on Write, since emptyDir is just a folder on a node and would bypass this overhead.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, but it's for the configuration, so performance is not really needed. So we can keep it as it exists.

@M0NsTeRRR
Copy link
Copy Markdown
Member

Hello,

Thanks for your PR! Since it's a new feature, you need to bump the version in Chart.yml to 2.2.0.

To generate the README, use helm-docs by running the helm-docs command from the charts folder. I forgot to add these instructions earlier, but I'll include them later, thanks for the reminder!

Also, if you want to use an existing PVC, as you mentioned, set .Values.config.persistence.enabled to false (the only thing needed in this PR), then configure your existing PVC as a volume and volume mount.

@Gylesie
Copy link
Copy Markdown
Contributor Author

Gylesie commented Mar 9, 2025

Hello,

Thanks for your PR! Since it's a new feature, you need to bump the version in Chart.yml to 2.2.0.

To generate the README, use helm-docs by running the helm-docs command from the charts folder. I forgot to add these instructions earlier, but I'll include them later, thanks for the reminder!

Also, if you want to use an existing PVC, as you mentioned, set .Values.config.persistence.enabled to false (the only thing needed in this PR), then configure your existing PVC as a volume and volume mount.

Thanks for the tip! I'll do that.

While you are absolutely right, I think having an option akin to existingClaim would be more up to helm chart standards and would relieve the users from having to fiddle with mountpoints themselves, which might very well change in the future.

@M0NsTeRRR
Copy link
Copy Markdown
Member

M0NsTeRRR commented Mar 9, 2025

Hello,
Thanks for your PR! Since it's a new feature, you need to bump the version in Chart.yml to 2.2.0.
To generate the README, use helm-docs by running the helm-docs command from the charts folder. I forgot to add these instructions earlier, but I'll include them later, thanks for the reminder!
Also, if you want to use an existing PVC, as you mentioned, set .Values.config.persistence.enabled to false (the only thing needed in this PR), then configure your existing PVC as a volume and volume mount.

Thanks for the tip! I'll do that.

While you are absolutely right, I think having an option akin to existingClaim would be more up to helm chart standards and would relieve the users from having to fiddle with mountpoints themselves, which might very well change in the future.

Okay, I didn't see many Helm charts doing this, but I don't disagree with your comment, so we can do it this way 👍.

# -- Creating PVC to store configuration
config:
persistence:
# -- set to true to use pvc
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# -- set to true to use pvc
# -- Set to true to use PVC

# -- Name of the permanent volume to reference in the claim.
# Can be used to bind to existing volumes.
volumeName: ""
# -- specify an existing `PersistentVolumeClaim` to use
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# -- specify an existing `PersistentVolumeClaim` to use
# -- Specify an existing `PersistentVolumeClaim` to use

Copy link
Copy Markdown
Member

@M0NsTeRRR M0NsTeRRR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for minor typos and the suggested changes we discussed, it looks good to me :)

@gauthier-th gauthier-th changed the title Add an option to specify no PVC or a preexisting one feat(helm): add an option to specify no PVC or a preexisting one May 7, 2025
@gauthier-th
Copy link
Copy Markdown
Member

@Gylesie can you please fix the requested changes?

@github-actions github-actions Bot added the merge conflict Cannot merge due to merge conflicts label Sep 23, 2025
@github-actions
Copy link
Copy Markdown

This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.

@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open 30 days with no activity. Please address the feedback or provide an update to keep it open.

@github-actions github-actions Bot added the stale label Dec 26, 2025
@gauthier-th
Copy link
Copy Markdown
Member

@M0NsTeRRR do you want to fix the pending comments yourself?

@github-actions github-actions Bot removed the stale label Dec 28, 2025
@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open 30 days with no activity. Please address the feedback or provide an update to keep it open.

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

Labels

merge conflict Cannot merge due to merge conflicts pending author's response stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants