cli-runtime icon indicating copy to clipboard operation
cli-runtime copied to clipboard

allow a cutstom io.Reader for stdin in resource.Builder

Open sding3 opened this issue 2 years ago • 2 comments

k8s.io/kubectl affords genericclioptions.IOStreams to allow overriding stdin, stdout, and stderr. However, the resource.Builder and resource.Visitor abstractions don't have the option to allow configuring a custom stdin, which ultimately leads to unexpected behavior when a consumer of the k8s.io/kubectl library overrides the stdin but their program end up still getting IO blocked on os.Stdin. So resource.Builder and resource.Visitor should provide the ability for stdin to be overridden so that k8s.io/kubectl can use that ability to override stdin when appropriate.

sding3 avatar Aug 17 '23 19:08 sding3