Skip to content
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

Flag for excluding resources from detection #16

Open
victorswed opened this issue Feb 26, 2024 · 4 comments
Open

Flag for excluding resources from detection #16

victorswed opened this issue Feb 26, 2024 · 4 comments

Comments

@victorswed
Copy link

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.

@nikhilsbhat
Copy link
Owner

nikhilsbhat commented Feb 27, 2024

@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.

@victorswed
Copy link
Author

@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.

@victorswed
Copy link
Author

victorswed commented Feb 28, 2024

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?

@nikhilsbhat
Copy link
Owner

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants