carvel-dev/imgpkg

Allow for file exclusions based on entries in an .imgpkgignore file - similar to .gitignore

trisberg opened this issue · 1 comments

Describe the problem/challenge you have
[A description of the current challenge that you are experiencing.]

I'm creating an image for the contents of a git repo, would like to exclude some files/directories when the image is generated - I can try to use --file-exclusion but it would be convenient to have something like a .imgpkgignore file, similar to .gitignore or .tiltignore

Describe the solution you'd like
[A clear and concise description of what you want to happen. If applicable a visual representation of the UX (ex: new CLI argument name, the behavior expected).]

it would be convenient to have something like a .imgpkgignore file, similar to .gitignore or .tiltignore where I could specify these file exclusions

Anything else you would like to add:
[Additional information that will assist in solving the issue.]


Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help work on this issue.

Hey, @trisberg
This does make sense and definitely a cool feature.

In terms of syntax, I agree we should go with the common format that currently is used by gitignore.

Some implementation ideas:

  • When reading the file we can generate the rules and use the same mechanism we have for --file-exclusion
  • Having multiple .imgpkgignore can be allowed. Same behavior as git, the .imgpkgignore will be local to the folder provided
  • We should fail if .imgpkgignore is ignoring the .imgpkg folder