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

koyeb instance copy #161

Merged
merged 3 commits into from
Dec 11, 2023
Merged

koyeb instance copy #161

merged 3 commits into from
Dec 11, 2023

Conversation

pawelbeza
Copy link
Contributor

@pawelbeza pawelbeza commented Dec 1, 2023

koyeb instance cp

This is implementation of #126 which enables copying to/from koyeb instances

The implementation is quite similar to the kubectl cp (don't recommend looking at kubectl code tho as it's super messy to say the least :D)

TLDR; implementation is based on tarring and untaring input files/folders

  • when we copy sth to koyeb instance we (1) programmatically create a tarball on the koyeb-cli side (2) stream input to the koyeb instance (3) extract tar with tar tool on the koyeb instance side. This also assumes that tar tool needs to be installed on koyeb instance (this assumption is made also in kubectl cp)
  • when we copy sth from koyeb instance we (1) create tarball with tar tool on the koyeb instance side (2) stream output to the koyeb-cli (3) extract tar programmatically on the koyeb-cli side

Prerequisites

Merge koyeb/koyeb-api-client-go#80

Testing

Copy to koyeb instance

koyeb instances cp -c ~/.koyeb.staging.yaml /local/path 676be6b2:/remote/path

Copy from koyeb instance

koyeb instances cp -c ~/.koyeb.staging.yaml 676be6b2:/remote/path /local/path

@pawelbeza pawelbeza added the enhancement New feature or request label Dec 1, 2023
Add feature which enable copying to koyeb instances
(smilar functionality as kubectl cp)
Add feature which enable copying from koyeb instances
(smilar functionality as kubectl cp)
@pawelbeza pawelbeza merged commit b505286 into master Dec 11, 2023
2 checks passed
@brmzkw brmzkw deleted the koyeb-cli-126 branch April 10, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants