kubeval icon indicating copy to clipboard operation
kubeval copied to clipboard

Provide an --exclude command line argument to exclude some patterns or files

Open arthurzenika opened this issue 3 years ago • 4 comments

Hey, kubeval looks really useful. We're adding it to our heptapod/gitlab CI. It's as simple as

kubeval:
  image: garethr/kubeval
  script:
    - kubeval --directories .

We use kustomize https://kustomize.io/ so we have a bunch of kustomization.yaml which fail the test. Since we also store the resulting generated files in our repos, we'd like to be able to run kubeval --directories . --exclude kustomization.yaml

arthurzenika avatar Aug 10 '20 10:08 arthurzenika

Our workaround for now is :

kubeval:
  image: garethr/kubeval
  script:
    - rm */*/kustomization.yaml
    - kubeval --directories . 

arthurzenika avatar Aug 10 '20 10:08 arthurzenika

You should be able to use --ignored-filename-patterns

joshuaspence avatar Aug 16 '20 02:08 joshuaspence

@johanneswuerbach thanks ! It works. I've added a mention of that option in the documentation.

arthurzenika avatar Aug 18 '20 08:08 arthurzenika

--ignored-filename-patterns feature seems in the next release...

John-Lin avatar Oct 22 '20 04:10 John-Lin