Some maintenance scripts take input on stdin, like a list of URLs. On bare metal, that's easy, because the script is running in your own shell. With the script running on k8s, it can still be accomplished with kubectl attach, but it's unwieldy.
With the new wrapper script mwscript-k8s on the deployment host, we'd like to be able to pass input through to the pod using an underlying kubectl attach, with the UI being something like either:
$ cat urls.txt | mwscript-k8s --attach -- ScriptThatDoesStuffWithUrls.php --wiki=aawiki
or:
$ mwscript-k8s --attach -- ScriptThatDoesStuffWithUrls.php --wiki=aawiki I'm a maintenance script, please enter URLs: https://example.com/the-user-is-typing-this-in ^D
We should support both use cases. The former needs attach -i, with stdin: true in the container spec. (It also needs stdinOnce: true; I believe there are no maintenance situations where we want the default behavior with stdinOnce: false.) The latter also needs a TTY allocated, so the same plus attach -t and tty: true.