kubernetes-client
kubernetes-client copied to clipboard
Better File utilities
Hello all, I realize that this might be a little bit of an ask, as I know the API follows (generally) the OC command structure, but I was wondering if the pod file handling API could be expanded.
The file api (client.pods().withName().file().*) seems pretty sparse, and was wondering if it would be possible to add full file CRUD capabilities here.
For my own purposes, I have been able to 'fill in' the capabilities I need beyond what is available with .file() using exec commands, but I don't consider this optimal, though perhaps that might be how some functionalities need to happen 'behind the scenes' here...
To be clear, it would be nice to have:
file().upload(OutputStream)(upload via streams, rather than needing a file on the client to exist)file().delete()deleting the filefile().exists()determining if the file actually exists
My particular use case is I am writing integration tests for a system that relies on files in a PV, and in order to get proper coverage I need to interact with the files directly.
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!
Bump? Been a while, hadn't heard anything.
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!
file().upload(OutputStream)(upload via streams, rather than needing a file on the client to exist)
This one is already covered:
client.pods().withName(podName).file("/path/to/file").upload(inputStream);
file().delete()deleting the file
file().exists()determining if the file actually exists
For these ones we could try to provide an implementation if interested, but it would be really brittle, especially for delete.
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!