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

PodUpload.upload() does not preserve folder structure anymore when uploading a directory #5238

Closed
msinger-dev opened this issue Jun 13, 2023 · 1 comment · Fixed by #5239
Closed
Assignees
Milestone

Comments

@msinger-dev
Copy link
Contributor

msinger-dev commented Jun 13, 2023

Describe the bug

Fabric8 does not preserve the folder structure when uploading directories and just puts everything in the root directory. So files that should be uploaded to /root/path/to/sub/folder will be uploaded to /root instead.

Fabric8 Kubernetes Client version

6.6.2

Steps to reproduce

1.) Call client.getPodResource(<pod>).inContainer(<>).dir(<dest>).upload(<sourcePath>); with a directory that has nested subfolders with files in it.
2. ) All files will be uploaded to the root folder and not in the nested subfolder as expected.

Expected behavior

Folder structures are also represented in the destination again, when uploading a directory with PodUpload.upload()

Runtime

Kubernetes (vanilla)

Kubernetes API Server version

1.25.3@latest

Environment

Linux

Fabric8 Kubernetes Client Logs

No response

Additional context

No response

msinger-dev added a commit to msinger-dev/kubernetes-client that referenced this issue Jun 13, 2023
msinger-dev added a commit to msinger-dev/kubernetes-client that referenced this issue Jun 13, 2023
msinger-dev added a commit to msinger-dev/kubernetes-client that referenced this issue Jun 13, 2023
@msinger-dev
Copy link
Contributor Author

Opened a PR with my proposed solution, which does fix the problem for us: #5239

manusa pushed a commit to msinger-dev/kubernetes-client that referenced this issue Jun 14, 2023
manusa pushed a commit to msinger-dev/kubernetes-client that referenced this issue Jun 14, 2023
manusa pushed a commit to msinger-dev/kubernetes-client that referenced this issue Jun 15, 2023
@manusa manusa added this to the 6.7.2 milestone Jun 15, 2023
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