Closed victorswed closed 3 months ago
@victorswed, If you want to include hooks while filtering by resource type, run the command with the flags --consider-hooks
and --kind
, where the --kind
parameter accepts multiple inputs.
@nikhilsbhat Thank you, Basically what I want to achieve is to exclude Job from the drift detection, due to the helm.sh/hook: pre-install, pre-upgrade
hook, the resource (in my case is Job) is not managed by the release, thus causing always a drift in the job resource, I want to exclude Job from the drift detection, https://helm.sh/docs/topics/charts_hooks/#hook-resources-are-not-managed-with-corresponding-releases.
I found the flag --skip
, but I have a different issue, where HPA in place and replicas change it finds a drift is it possible to --skip
specific field from a resource?
@victorswed, I'm not sure if it is feasible to skip certain fields while identifying drifts with current code.
The way the plugin handles the resources currently, doesn't support adding such features. To support this, I'll have to change the core logic of it. I'll see if this is possible when I have some time.
The issue of drifts caused by HPA
is addressed in commit https://github.com/nikhilsbhat/helm-drift/commit/5dd8d4e554980be66a893295e75c8419f44e519d. This commit resolves the problem using a different approach instead of skipping the field hence closing this.
I have a scenario where I use hooks "helm.sh/hook: pre-install, pre-upgrade" and I want to exclude those resources, it can be based on KIND e.g "Job", "Deployment" etc.