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

Not able to ignore chart folder even after adding entry in .helmdocsignore file #206

Open
1 task done
Pallavi028 opened this issue Dec 7, 2023 · 5 comments
Open
1 task done
Assignees
Labels
bug Something isn't working triage Issues that need to be triaged and categorized

Comments

@Pallavi028
Copy link

Pallavi028 commented Dec 7, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Hi ,

I'm trying to ignore one directory (helm-chart) under charts folder using .helmdocsignore file but upon running helm-docs cli command, it is still considering those directories which needs to be ignored and generating the README.md file for them.

Here is my .helmdocsignore file look like -
charts/app-portal
charts/app-portal/Chart.yaml

My directory structure looks like this
ls -altr
total 48
drwxr-xr-x 3 pallavipratik staff 96 Dec 6 21:10 env
-rw-r--r-- 1 pallavipratik staff 20 Dec 6 21:10 properties.yaml
drwxr-xr-x 12 pallavipratik staff 384 Dec 6 21:10 templates
drwxr-xr-x 12 pallavipratik staff 384 Dec 6 21:10 ..
-rw-r--r-- 1 pallavipratik staff 664 Dec 7 11:42 values.yaml
-rw-r--r-- 1 pallavipratik staff 396 Dec 7 12:53 Chart.lock
-rw-r--r-- 1 pallavipratik staff 277 Dec 7 14:21 Chart.yaml
drwxr-xr-x 7 pallavipratik staff 224 Dec 7 14:29 charts
-rwxrwxrwx 1 pallavipratik staff 47 Dec 7 14:31 .helmdocsignore
-rw-r--r-- 1 pallavipratik staff 1564 Dec 7 14:42 README.md
drwxr-xr-x 11 pallavipratik staff 352 Dec 7 15:31 .

Under charts folder I have my dependency charts, (where I want to ignore one of the depdendent chart.)
ls -ltr charts/
total 416
-rw-r--r-- 1 pallavipratik staff 114938 Dec 7 14:23 common-1.0.60.tgz
-rw-r--r-- 1 pallavipratik staff 92088 Dec 7 14:24 app-portal-1.0.38.tgz
drwxr-xr-x 14 pallavipratik staff 448 Dec 7 14:28 common
drwxr-xr-x 11 pallavipratik staff 352 Dec 7 14:30 app-portal

When running helm-docs, getting below logs
helm-docs -i .helmdocsignore

INFO[2023-12-07T14:42:56+05:30] Found Chart directories [., charts/app-portal, charts/app-portal/charts/banking-prometheus-rules, charts/app-portal/charts/banking-prometheus-rules/charts/common, charts/app-portal/charts/common, charts/common]
INFO[2023-12-07T14:42:56+05:30] Generating README Documentation for chart charts/app-portal/charts/banking-prometheus-rules
INFO[2023-12-07T14:42:56+05:30] Generating README Documentation for chart charts/app-portal/charts/common
INFO[2023-12-07T14:42:56+05:30] Generating README Documentation for chart .
INFO[2023-12-07T14:42:56+05:30] Generating README Documentation for chart charts/common
INFO[2023-12-07T14:42:56+05:30] Generating README Documentation for chart charts/app-portal/charts/banking-prometheus-rules/charts/common
INFO[2023-12-07T14:42:56+05:30] Generating README Documentation for chart charts/app-portal

One thing to note that its not printing log msg like No ignore file found at helm-charts/.helmdocsignore, using empty ignore rules

helm-docs version I'm using is
helm-docs --version
helm-docs version 1.11.3

Expected Behavior

Expected behaviour would be , helm-docs should ignore app-portal folder under charts directory as I have made an entry in the ..helmdocsignore file .

Reference Chart

NA

Reference Template

No response

Environment

  • Operating system:
  • Helm version (output of helm version): version.BuildInfo{Version:"v3.8.1", GitCommit:"5cb9af4b1b271d11d7a97a71df3ac337dd94ad37", GitTreeState:"clean", GoVersion:"go1.17.5"}
  • GO version (output of go version):
  • Method of calling helm-docs (manual, jenkins, github action ...): manual . helm-docs version 1.11.3

Link to helm-docs Logs

No response

Further Information

No response

@Pallavi028 Pallavi028 added bug Something isn't working triage Issues that need to be triaged and categorized labels Dec 7, 2023
@borisrizov-zf
Copy link

borisrizov-zf commented Dec 13, 2023

I can confirm the behaviour. I have a charts/pgadmin4 folder in my main charts/project folder. Ignoring does nothing.
Might be useful to add a flag to ignore a folder without setting a .helmdocsignore file, e.g. --ignore-dir some-dir/.

The only thing that doesn't happen is to add the sub-documentation to the main documentation. Maybe that's the intended behaviour?

@norwoodj
Copy link
Owner

This is not intended behavior, however I cannot reproduce this. Can one of you send me a tar archive of your repository, or make one of these repositories publicly available in some way so I can test against your setup?

@borisrizov-zf
Copy link

Hi,
the repository where I had the issue: https://github.com/eclipse-tractusx/managed-identity-wallet

@norwoodj
Copy link
Owner

norwoodj commented Mar 2, 2024

@borisrizov-zf in your case, the .helmdocsignore file is at the wrong location:

$ find . -name .helmdocsignore
./charts/managed-identity-wallet/.helmdocsignore
$ cat $(!!)
charts/
$ helm-docs -l debug
DEBU[2024-03-02T13:43:41Z] No ignore file found at /tmp/managed-identity-wallet/.helmdocsignore, using empty ignore rules 
...

The .helmdocsignore file is like a .gitignore file, it must be at the root of the repository.

$ mv charts/managed-identity-wallet/.helmdocsignore .
$ echo charts/managed-identity-wallet/charts > .helmdocsignore 
$ helm-docs -l debug
DEBU[2024-03-02T13:46:38Z] Found ignore file at /tmp/managed-identity-wallet/.helmdocsignore, using those ignore rules 
DEBU[2024-03-02T13:46:38Z] Ignoring directory /tmp/managed-identity-wallet/.git 
DEBU[2024-03-02T13:46:38Z] Ignoring directory /tmp/managed-identity-wallet/charts/managed-identity-wallet/charts 

I wouldn't be surprised if this is also @Pallavi028's problem, but I'm having trouble understanding for sure from their comment.

@borisrizov-zf
Copy link

@norwoodj Hey, awesome! Thank you so much, I'll make sure to fix that right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Issues that need to be triaged and categorized
Projects
None yet
Development

No branches or pull requests

4 participants