Refactor Persistent Volume Configuration #565
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several changes to the persistent volume configuration in the Helm Dashboard chart, addressing concerns raised in GitHub issue #221. Key updates include:
Removal of
hostPath
configuration: ThehostPath
parameter has been removed from the configuration to discourage its use in production environments. This change aligns with best practices for production deployments, which typically avoid local host path volumes due to security and reliability concerns.Introduction of
finalizers
: Added thekubernetes.io/pvc-protection
finalizer to Persistent Volume Claims to prevent their deletion until associated resources are properly cleaned up. This ensures that data persistence is managed safely across the lifecycle of the resources.Dynamic volume name lookup: Implemented a conditional lookup for existing volume names using the
lookupVolumeName
parameter. This feature dynamically fetches and applies the volume name during Persistent Volume Claim creation if the volume already exists, improving the management of volume names and reducing manual errors.Commented out the
storageClass
parameter: The defaultstorageClass
is now commented out to promote the use of default provisioners unless explicitly specified by the user. This change simplifies the configuration for users who are content with default provisioning options.Removal of the PersistentVolume declaration: The entire declaration for PhysicalVolume has been dropped to streamline the configuration. Since the chart is expected to be used with dynamic volume provisioning (or existing PVC setups), defining a static PersistentVolume is redundant and could lead to configuration conflicts. This simplifies the deployment process and reduces the need for manual volume management.
These changes not only address the issues discussed in issue #221 but also enhance the robustness of volume management within the Helm Dashboard, aligning persistent storage configurations with best practices.