Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

Exclude paths regex #732

Open
Open
@HariSekhon

Description

@HariSekhon

Feature Request to be able to define an exclude regex so that I can exclude problematic K8s patch files that Datree is tripping up on.

For an example of these patch yamls, you can see this run in my public Kubernetes repo:

https://github.com/HariSekhon/Kubernetes-configs/runs/7412852029?check_suite_focus=true

Proposed Solution

--exclude switch that can take a regex

Example usage:

$ datree test **/*.yaml --exclude '\.patch\.yaml$'

Describe alternatives you've considered

I do this in shell (via function in my .bash.d/kubernetes.sh):

find . -type f -iname '*.y*ml' |
grep -v patch |
tr '\n' '\0' | 
xargs -0 datree test --only-k8s-files --ignore-missing-schemas

However, this doesn't work with action-datree so the CI/CD workflow is still broken.

I think it would be better handled via a native --exclude switch, but I'm open to other workarounds.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestup for grabsLooking for a contributor to take this task

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions