feat: add option to disable CSIDriver Helm hooks#197
Merged
zxh326 merged 5 commits intojuicedata:mainfrom Dec 4, 2025
Merged
Conversation
Add csidriver.disableHooks configuration option to allow users to disable Helm hooks on the CSIDriver resource. This addresses issues with ArgoCD and other GitOps tools where the combination of: - helm.sh/hook: pre-install,pre-upgrade - helm.sh/hook-delete-policy: before-hook-creation causes the CSIDriver resource to be deleted and recreated on every sync, potentially causing it to go missing if the creation fails or sync is interrupted. This leads to PVC mount failures and cluster instability. When csidriver.disableHooks is set to true, the CSIDriver will be created as a regular resource without hooks, preventing the deletion/recreation cycle. Changes: - Add csidriver.disableHooks value (default: false for backward compatibility) - Update csidriver.yaml template to conditionally include hook annotations - Bump chart version from 0.30.2 to 0.30.3 Fixes random CSIDriver missing issues in ArgoCD deployments.
zxh326
reviewed
Nov 24, 2025
deanpatel2
reviewed
Nov 24, 2025
| metadata: | ||
| name: {{ include "driverName" . }} | ||
| annotations: | ||
| {{- if not .Values.csidriver.disableHooks }} |
There was a problem hiding this comment.
Is it possible to also allow annotations in addition to disabling these ones? For example, if I wanted to add argocd.argoproj.io/sync-wave: "-5".
deanpatel2
approved these changes
Dec 3, 2025
zxh326
approved these changes
Dec 4, 2025
Signed-off-by: Xuhui zhang <xuhui@juicedata.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR adds a configuration option to allow users to disable Helm hooks on the CSIDriver resource. This addresses issues with ArgoCD and other GitOps tools.
Problem
The CSIDriver resource currently has these Helm hook annotations:
In ArgoCD and GitOps workflows, this combination causes the CSIDriver to be deleted and recreated on every sync operation, even when there are no changes to the CSIDriver itself. This happens because:
helm.sh/hookas hook resources that execute on every syncbefore-hook-creationpolicy deletes the existing CSIDriver before creating a new oneSolution
This PR adds a new configuration option:
When set to
true, the Helm hooks are not applied to the CSIDriver resource, treating it as a regular resource that is created once and persists across syncs.Changes
csidriver.disableHooksvalue invalues.yaml(default:false)templates/csidriver.yamlto conditionally include hook annotationsBackward Compatibility
csidriver.disableHooks: trueTesting
For ArgoCD users experiencing CSIDriver missing issues:
After this change, the CSIDriver will no longer be deleted/recreated on every ArgoCD sync.
References
helm.sh/resource-policy: keepbut it doesn't preventbefore-hook-creationdeletionFixes CSIDriver randomly going missing in ArgoCD deployments.