- we now use the full containerJSON details when getting a node
- we now use as many details as possible to copy k3d settings from an
existing node when adding a new node to a running cluster
- if no node with the target role exists in the cluster, just choose any
other (non-proxy) node instead
- to make this work, we also need to add the k3s url label to every node
With the updated cobra depencendy, we're now passing a context
from the cmd to the called functions.
When creating a cluster, one can pass a Duration to the --timeout
flag, which will create a new context with a timeout.
In the two blocking functions, where we're waiting for the master nodes
(initializing master nodes and "normal" master nodes), we're now
checking for the context cancellation as well, which may be caused
by the timeout.
Up to now, we exposed ports on single master nodes, which is quite
inconvenient on user side and troublesome on development side.
Now, we're creating a proxy container which exposes a single port
and proxies traffic to all master nodes.
Currently, this only works with 'k3d create cluster' and won't
update the proxy when using 'k3d create node --role master'.