-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: allow persistent volume name to be overridden in the helm chart #38752
Conversation
WalkthroughThis pull request introduces a new function for generating a persistent volume (PV) name in the Helm chart, enhancing configurability. The function Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
deploy/helm/values.yaml (1)
326-331
: Consider adding example usage in commentsThe parameter is well-documented, but would benefit from an example showing the override value format.
Add example usage like:
## @param persistence.pvNameOverride Override the PV name ## Useful when deploying multiple releases across different namespaces with the same name ## since PersistentVolumes are cluster-scoped resources + ## Example: + ## pvNameOverride: "custom-appsmith-pv" ## pvNameOverride: ""
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
deploy/helm/templates/_helpers.tpl
(1 hunks)deploy/helm/templates/persistentVolume.yaml
(1 hunks)deploy/helm/templates/persistentVolumeClaim.yaml
(1 hunks)deploy/helm/values.yaml
(1 hunks)
🔇 Additional comments (3)
deploy/helm/templates/_helpers.tpl (1)
124-128
: Implementation follows Helm best practicesThe new template function correctly implements the override pattern with a proper fallback mechanism.
deploy/helm/templates/persistentVolumeClaim.yaml (1)
24-24
: Verify volume binding behaviorThe implementation correctly uses the new pvname template. However, ensure that volume binding still works as expected when deploying multiple instances.
✅ Verification successful
Volume binding implementation verified
The PV/PVC naming implementation is safe for multiple instances:
- Uses release-scoped names by default
- Supports custom name override
- Handles existing PVC scenarios
- Configurable binding mode
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check for any existing PVCs that might conflict kubectl get pvc -A --show-labels | grep "app=appsmith"Length of output: 152
Script:
#!/bin/bash # Check volume related configurations echo "=== PV/PVC Templates ===" fd . deploy/helm/templates -e yaml -x cat {} | grep -A 5 -B 5 "volumeName\|storageClassName\|bindingMode" echo -e "\n=== Volume Name Template Function ===" fd . deploy/helm/templates -e tpl -x cat {} | grep -A 5 -B 5 "pvname"Length of output: 2133
deploy/helm/templates/persistentVolume.yaml (1)
5-5
: Implementation maintains consistency with PVCThe PV name change correctly aligns with the PVC implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment, but otherwise looks ready to go.
@@ -2,8 +2,7 @@ | |||
apiVersion: v1 | |||
kind: PersistentVolume | |||
metadata: | |||
name: {{ include "appsmith.fullname" . }} | |||
namespace: {{ include "appsmith.namespace" . }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing this while I'm in here. PVs are not a namespaced object. Helm and some clients will simply ignore this, but not all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot, can we change the version in Chart.yaml as well please?
Ok, cool. I wasn't sure what the release process looked like for the chart yet. Bumped that up. |
Addressed all of the issues raised.
Description
Exposes a value under the
persistence
key to allow the PV name to be overridden. This was requested by a customer that does multiple deploys of Appsmith per cluster in different namespaces with the same Helm release name. Since PV's are not namespaced, the deploy was failing.Fixes #
Issue Number
or
Fixes
Issue URL
Warning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
Automation
/ok-to-test tags=""
🔍 Cypress test results
Warning
Tests have not run on the HEAD 8a0e2ba yet
Thu, 23 Jan 2025 14:35:55 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
Improvements