https://github.com/juju/juju/pull/10892
Description of change
add-k8s command is frequently piped. However, the behavior of the command has changed to prompt for user input when neither --client nor --controller option was specified to support an ASK-OR-TELL brief.
Since the pipe and commands that require user input don't work together, if the pipe was used, the command to fail immediately with a descriptive message.
As a drive-by, rename remaining reference to an ephemeral --client-only option.
QA steps
- $ microk8s.config | juju add-k8s k8s
This operation can be applied to both a copy on this client and to the one on a controller.
ERROR The command is piped and Juju cannot prompt to clarify whether the --client or a --controller is to be used.
Please clarify by re-running the command with the desired option(s).
- $ juju add-credential aws (to ensure everything else works)
This operation can be applied to both a copy on this client and to the one on a controller.
No current controller was detected and there are no registered controllers on this client: either bootstrap one or register one.
Do you ONLY want to add a credential to this client? (Y/n):
Bug reference
https://bugs.launchpad.net/juju/+bug/1851849 https://bugs.launchpad.net/juju/+bug/1851852
该提问来源于开源项目:juju/juju