feat: add uc context create - #327
Conversation
the context is |
|
where should this be tested? test/e2e/machine_test.go ? |
|
weird |
|
a user just came in asking fo such a feature. If you have specifics on why this doesn't work in some usecases let me know so I can brush up the PR |
|
From the Discord discussion, I think something like the following feels like a more generic approach: this generates and adds the following to and optionally sets the
That's why I'm suggesting to require a user to explicitly specify what connections to use and their hosts/IPs. We don't need to list all the machines in the connections. So I'd say listing only 1 machine with the correct user@host is more preferable than all machines with potentially incorrect addresses. |
technically correct, but this is also something that serves as documentation, which machines do we actually have in our cluster. (Yes uc machine ls also does this - but having a complete listing in the config would help). Point taken on the public ips, those machines prolly need to be filtered out? (I.e. a different route then your suggestion) |
This gets the context from the remote machine and add it to the correct place in your uncloud config. Signed-off-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Miek Gieben <miek@miek.nl>
Add context as alias and make main cmd ctx Signed-off-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Miek Gieben <miek@miek.nl>
2094851 to
5451bc0
Compare
|
this now is: us context create and only add machines that have a public IP address PTAL |
This gets the context from the remote machine and add it to the correct place in your uncloud config.