kube-linter
kube-linter copied to clipboard
[FEATURE_REQUEST] Add `--exclude-paths` option to exclude linting files under those paths
Description of the problem/feature request
Our project contains a third_party folder containing yaml files that do not concern us, I would like an option to ignore all files under that path.
Description of the existing behavior vs. expected behavior Currently this is not an option
Additional context N\A
Hi @asilverman, thanks for filing this issue! To confirm, is your current workflow to run kube-linter lint . at the root of a directory with a lot of files?
I'd like to see something like this too, though ideally being able to configure the excluded paths using the .kube-linter.yaml configuration file. In my particular case I have a directory that contains some Kustomization patches as well as some upstream YAMLs; annotating those doesn't make sense (I'd like to avoid modifying the upstream YAML at all) so I'd just like to exclude them.
Please add this feature. We also need this. Thank you
This feature would be useful to exclude upstream charts for which we don't want to make changes.
any progress on this? we need this feature as well...
Any updates for this feature, I am looking this option as well.
Hi @asilverman, thanks for filing this issue! To confirm, is your current workflow to run
kube-linter lint .at the root of a directory with a lot of files?
Yes
Hi @asilverman, thanks for filing this issue! To confirm, is your current workflow to run
kube-linter lint .at the root of a directory with a lot of files?Yes
same here
I see this was added in v0.6.0 but it doesn't seem to work. Has anyone had any luck with this? I've tried multiple variations of paths in the config and the CLI flag with no prevail.
@titanlien
Hi @begs Did you ever try --ignore-paths in v0.6.0 version? It should work.
Hi @begs Did you ever try
--ignore-pathsin v0.6.0 version? It should work.
Hi @titanlien! Yes, I haven't been able to make it work.
$ kube-linter version
0.6.0
I have tried including a path to ignorePaths in the config and with the --ignore-paths flag, but it still shows errors from that path when I run kube-lint lint . from the repository root.
I have tried variations of global and relative path but with no luck. I have been able to exclude checks using the config file though, so it is definitely able to read the config.
There is someone else with the same issue here.
I have tried including a path to ignorePaths in the config and with the --ignore-paths flag, but it still shows errors from that path when I run kube-lint lint . from the repository root.
I have tried variations of global and relative path but with no luck. I have been able to exclude checks using the config file though, so it is definitely able to read the config.
Sounds like this issue is related: https://github.com/stackrox/kube-linter/issues/500 (FYI I've got the same problem, ignorePaths doesn't seem to apply).
@janisz Looks like the fix landed with #515. Can we close this issue & cut new bug fix release?
Sure, I'm waiting for one more PR and will cut release tomorrow. Thanks for pointing this out.