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 to exclude build-args and env vars from cache key #3139

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Cdayz
Copy link

@Cdayz Cdayz commented Apr 26, 2024

Description

We are building a system that helps us build docker images inside k8s. We are using kaniko for this purpose. This system is highly interactive as we aim to offer a seamless experience for our end-users. To achieve this, we utilize build caches. However, for every build, we need to generate different build-args and environment variables that cannot be the same each time. Although they change with each build, they do not affect the resulting docker image. Therefore, we require options in kaniko to exclude these build-args and envs from the cache key. If we do not do this, we will experience 100% cache misses, which would be undesirable.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes unit tests
  • Adds integration tests if needed.

See the contribution guide for more details.

Reviewer Notes

  • The code flow looks good.
  • Unit tests and or integration tests added.

Release Notes

  • kaniko/executor adds a new flag --exclude-build-arg-from-cache-key specify build-args that should be excluded from composite cache key
  • kaniko/executor adds a new flag --exclude-env-from-cache-key specify environment variables that should be excluded from composite cache key

Copy link

google-cla bot commented Apr 26, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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 this pull request may close these issues.

None yet

1 participant