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

Add support for the copy command (kubectl cp) #81

Open
sparkymartin opened this issue Jun 24, 2021 · 2 comments
Open

Add support for the copy command (kubectl cp) #81

sparkymartin opened this issue Jun 24, 2021 · 2 comments

Comments

@sparkymartin
Copy link

It would be great if this library could support the copy command to copy files to a pod. I foresee this keyword needing to know the following information (arguments):

  • Namespace
  • Filename(s) to copy
  • Source Path (local)
  • Destination Path (on the pod)
  • Pod Name (the name of the pod to copy the files to)
  • Timeout (the maximum length of time to wait before erroring out and moving on)
@Nilsty
Copy link
Collaborator

Nilsty commented Jul 12, 2021

Hi @sparkymartin,
please have a look at my PR #84
kubectl cp seems to be using the same functionality as kubectl exec. I added a few examples as test cases to show how it can be used. This one is basically copying a file from a container: https://github.com/Nilsty/KubeLibrary/blob/e164476a591feab884afb3cf16a5c04982c228cc/testcases/pod/pod_exec.robot#L29

I have not implemented a timeout handling, but it would be interesting to know if this implementation goes into the right direction and would be any use for you.

Thanks,
Nils

@MarcinMaciaszek
Copy link
Contributor

@Nilsty that is a good idea, however what about binary files? I can take this task, if there is sufficient API ;-)

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.

3 participants