Commit Graph

5 Commits

Author SHA1 Message Date
Nicolas Lamirault
61107ca5bf
Update: use log level
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
2019-09-28 19:58:05 +02:00
Nicolas Lamirault
3631e65570
Update: replace log with logrus
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
2019-09-25 22:41:00 +02:00
Andy Zhou
aa6e142b81 Log more information when the docker-machine command fails
Currently, when the 'docker-machine' command fails, we only logs

   "exit status 1'

Which is not very helpful in root cause analysis.

With this patch, the 'docker-machine' command's stderr output is also
logged.

  # To cause docker-machine command fail
  $ export DOCKER_MACHINE_NAME=xx
  $ k3d create
2019/06/13 16:45:31 Created cluster network with ID 6fc91e0e5e912443e6b847f113a6a0bb85ccd610e5232592296d4b199f0347cf
2019/06/13 16:45:31 Error executing 'docker-machine ip'
2019/06/13 16:45:31 Docker machine "xx" does not exist. Use "docker-machine ls" to list machines. Use "docker-machine create" to add a new one.
exit status 1
2019-06-13 16:47:27 -07:00
Andy Zhou
f3ec169414 Add docker machine IP to SAN
When running on a docker machine, the default X598 certificate does not
allow access via docker machine's IP. This patch fixes this by adding
"--tls-san <docker machine IP>" to the K3S server argument list.
2019-06-01 10:57:42 -07:00
Andy Zhou
de6e845abd Support docker machine for kubeconfig.yaml
The kubeconfig.yaml generated by K3S uses local host as the host name by
default. It won't work when running with docker machine.

This patch detects if the docker environment is set up with docker
machine. If it is, then replace the host name to the IP address of
the docker machine.
2019-05-29 09:09:13 -07:00