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

[FEATURE_REQUEST] Allow excluding 3rd party Helm charts check #467

Closed
vzabawski opened this issue Jan 9, 2023 · 4 comments
Closed

[FEATURE_REQUEST] Allow excluding 3rd party Helm charts check #467

vzabawski opened this issue Jan 9, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@vzabawski
Copy link

Description of the problem/feature request
I have a Helm chart "my-app" which contains some resources. This chart uses several 3rd party charts as a dependency. When I'm verifying my chart, all errors are related to 3rd party charts which I can't fix.

Description of the existing behavior vs. expected behavior
It would be nice if ignorePaths supported Helm charts or if there was some other way to exclude 3rd party charts from the validation. Right now the workaround for me is to cleanup charts dir in my Helm chart. In that case, kube-linter doesn't pick up 3rd party charts due to their absence and does not validate.

Here's my chart structure:

helm-charts/cumulus-monitoring
├── Chart.lock
├── Chart.yaml
├── README.md
├── charts
│   ├── influxdb-4.12.0.tgz
│   ├── ingress-nginx-4.1.4.tgz
│   ├── kube-prometheus-stack-41.5.1.tgz
│   └── splunk-connect-for-kubernetes-1.4.15.tgz
├── templates
│   ├── clusterrole.yaml
│   ├── secret.yaml
│   └── tls-secrets.yaml
└── values.yaml
@janisz
Copy link
Collaborator

janisz commented Jan 9, 2023

refs: #353

@janisz janisz added the enhancement New feature or request label Jan 9, 2023
@janisz
Copy link
Collaborator

janisz commented Apr 11, 2023

Fixed by: #515

@janisz janisz closed this as completed Apr 11, 2023
@vzabawski
Copy link
Author

vzabawski commented May 16, 2023

Hi @janisz. I'm still reproducing this issue with kube-linter 0.6.3.
I've tried config file and the command, but nothing seems to be working.

kube-linter lint --ignore-paths "charts/influxdb-*.tgz" .
kube-linter lint --ignore-paths "charts/influxdb/**" .

@janisz
Copy link
Collaborator

janisz commented May 17, 2023

@vzabawski charts are loaded differently. I'm not sure how is your project structured but let's take kube-linter test dir (test/testdata) as an example.

tests/testdata
├── mychart
│   ├── Chart.yaml
│   ├── templates
│   │   ├── deployment.yaml
│   │   ├── _helpers.tpl
│   │   ├── hpa.yaml
│   │   ├── ingress.yaml
│   │   ├── NOTES.txt
│   │   ├── serviceaccount.yaml
│   │   ├── service.yaml
│   │   └── tests
│   │       └── test-connection.yaml
│   └── values.yaml
├── mychart-0.1.0.tgz
└── splunk.yaml

Following command will not scan anything:

kube-linter lint \
    --ignore-paths '**/*.yaml' \     
    --ignore-paths '**/*.tgz' \        
    --ignore-paths '**/mychart' \  
    tests/testdata
  • --ignore-paths '**/*.yaml' – filters only splunk.yaml
  • --ignore-paths '**/*.tgz' – filters only mychart-0.1.0.tgz
  • --ignore-paths '**/mychart' – filters only mychart dir that is not filtered by previous yaml filter as it's detected as a helm dir and included as a whole without fine grained filtering it's content.

Could you share your dir structure?

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

No branches or pull requests

2 participants