* fix: unable to import image Darwin/arm64
* Modify go module name
* Rollback the module name
Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
---------
Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
- do not close connection of exec process before having read everything
- as a backwards-compatible fix, we now read all logs into a new
bufio.Reader so we can savely close the connection and original reader
- start tools node with --add-host=host.k3d.internal:host-gateway
(docker feature) and use it for getHostIP on DfD (TODO: we can use this
on all platforms)
- use `k3d-tools` (classic) image importing for remote docker hosts
- use direct streaming into the nodes (node exec with stdin) on local docker connections
- make use of environment and runtime info
- DfD: use host.docker.internal
- All other cases: use Docker network Gateway
- k3d-tools: based on alpine to have `getent` present
- `--cluster` flag parsed for `https://` prefix and node creation treated differently accordingly
- new `--network` string array flag to add the node to multiple networks (primary network when adding to a remote cluster)
- new `--token` flag to provide the cluster token
- before starting the cluster, gather environment info via tools node
- use hostIP/gatewayIP for DNS (iptables + resolv.conf updated in entrypoint script)
- revamp of custom entrypoint scripts
- loads images from tarballs and runtime
- only tries to do something if respective lists are not empty
- only creates tools node if it's not present yet
- uses new tools image to remove tarballs after process
Use `log.Fatalln(err)` instead of `log.Errorln(err)` + `os.Exit(1)`
Use Label prefix instead of LabelName suffix
Rename all secret occurence with token
Print usage When no k3d verb was specify
Replace fake Cluster object create into getKubeConfig by realy complete object obtain thanks to cluster.GetCluster() function
Use constant variable for node Label name use into populateClusterFieldsFromLabels() function, in forecast to rename label `k3d.cluster.secret` to `k3d.cluster.token`
- package cluster: use context.Context as first function param in every
exported function
- package cmd: pass cmd.Context() to calls to package cluster exported
functions
- imageVolume couldn't be determined before in some cases, because it
tried to extract the name from labels on the masterlb which doesn't have
them.
- now we're only trying get the label from master/worker nodes and this
also adds a failover solution
- also, we ignore non-worker/master nodes upon image import