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

Allow configuration of extra ignore-list paths #1621

Closed
kamaln7 opened this issue Apr 7, 2021 · 1 comment · Fixed by #1622
Closed

Allow configuration of extra ignore-list paths #1621

kamaln7 opened this issue Apr 7, 2021 · 1 comment · Fixed by #1622

Comments

@kamaln7
Copy link
Contributor

kamaln7 commented Apr 7, 2021

Suggestion

This refers to the ignore-list that is used when cleaning up the filesystem between different build steps. Currently the ignore list is initialized with a few default values, and then all filesystem mounts are added to the list.

It would be great if we could pass a CLI flag to add paths to the list, for example /kaniko/executor --ignore-path /first/path --ignore-path /second/path.

Use-case

In our case, we extend the Kaniko image with a few functionalities that our builds require, so we place all the shell scripts and tools in one directory (say /.tools). These scripts manage the build lifecycle and run the kaniko executor binary. We base our Dockerfile on the official Kaniko executor image and, among other things, add a VOLUME /.tools directive so that it's picked up by Kaniko and added to the ignore list.

However we run our builds on Kubernetes, and the problem with this approach is that we can't enforce disk storage limits on /.tools because it's not defined as a volume in the Kubernetes container spec. We also can't do that because it would then mount /.tools as an empty directory not containing the files that are in the actual image.

---

I realize that running the kaniko executor on a different image is neither officially supported nor recommended, but this option would make things a lot easier for us. If this idea is approved we'd be happy to give it a shot and submit a PR :)

@hugbubby
Copy link

hugbubby commented Apr 9, 2021

I have another reason for this... The gitlab CI requires that caches be inside the project directory and not in /var/run. Normally I would just specify for golang caches to be in some /var/run/etc, but I can't do that as gitlab won't cache those locations.

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

Successfully merging a pull request may close this issue.

2 participants