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

Better File utilities #2752

Closed
GregJohnStewart opened this issue Jan 27, 2021 · 5 comments
Closed

Better File utilities #2752

GregJohnStewart opened this issue Jan 27, 2021 · 5 comments
Labels
enhancement status/stale Waiting on feedback Issues that require feedback from User/Other community members

Comments

@GregJohnStewart
Copy link

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 file
  • file().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.

@stale
Copy link

stale bot commented May 9, 2021

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!

@stale stale bot added the status/stale label May 9, 2021
@stale stale bot closed this as completed May 16, 2021
@GregJohnStewart
Copy link
Author

Bump? Been a while, hadn't heard anything.

@manusa manusa reopened this May 17, 2021
@stale
Copy link

stale bot commented Aug 15, 2021

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!

@manusa
Copy link
Member

manusa commented Mar 5, 2024

  • 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.

@manusa manusa added Waiting on feedback Issues that require feedback from User/Other community members and removed status/never-stale labels Mar 5, 2024
Copy link

stale bot commented Jun 4, 2024

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!

@stale stale bot added the status/stale label Jun 4, 2024
@stale stale bot closed this as completed Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement status/stale Waiting on feedback Issues that require feedback from User/Other community members
Projects
None yet
Development

No branches or pull requests

3 participants