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

tar: read directly from stdin #1728

Merged
merged 2 commits into from
Dec 26, 2021

Conversation

kvaps
Copy link
Contributor

@kvaps kvaps commented Aug 22, 2021

Description

When using --context=tar://stdin option kaniko first writing tar.gz file on the drive, then unpacking it.
This PR changes this behavior to allow unpacking tar archive by reading it directly from stdin.

This also enables opportunity to reuse stdin to run debug shell #1727

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

Describe any changes here so maintainer can include it in the release notes, or delete this block.

- reading context from 'tar://stdin' improved by unpacking directly from the piped stream

@google-cla google-cla bot added the cla: yes CLA signed by all commit authors label Aug 22, 2021
@tejal29
Copy link
Member

tejal29 commented Oct 19, 2021

please rebase to run the tests!

@kvaps
Copy link
Contributor Author

kvaps commented Nov 2, 2021

PR rebased to v1.7.0, new docker images with this change prepared:

ghcr.io/kvaps/kaniko-executor:v1.7.0
ghcr.io/kvaps/kaniko-executor:v1.7.0-debug
ghcr.io/kvaps/kaniko-warmer:v1.7.0

source code of fork in master branch:
https://github.com/kvaps/kaniko/

Copy link
Collaborator

@imjasonh imjasonh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems like something that should be accompanied by an integration test, wdyt?

pkg/util/fs_util.go Outdated Show resolved Hide resolved
@imjasonh imjasonh merged commit 2ea368d into GoogleContainerTools:master Dec 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes CLA signed by all commit authors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants