Unverified Commit ae8309f1 authored by Sharif Elgamal's avatar Sharif Elgamal

Merge branch 'master' of github.com:kubernetes/minikube into node-pkg

parents 317dd411 10aaa593
# Release Notes
## Version 1.7.0-beta.1 - 2020-01-24
* Add 'pause' command to freeze Kubernetes cluster [#5962](https://github.com/kubernetes/minikube/pull/5962)
* kic driver: add multiple profiles and ssh [#6390](https://github.com/kubernetes/minikube/pull/6390)
* Update DefaultKubernetesVersion to v1.17.2 [#6392](https://github.com/kubernetes/minikube/pull/6392)
* Add varlink program for using with podman-remote [#6349](https://github.com/kubernetes/minikube/pull/6349)
* Batch file manipulation calls to reduce number of redundant commands [#6385](https://github.com/kubernetes/minikube/pull/6385)
* Update Kubernetes libraries to v1.17.2 [#6374](https://github.com/kubernetes/minikube/pull/6374)
* Fix dashboard by using kubectl apply/delete instead of prune for addons [#6376](https://github.com/kubernetes/minikube/pull/6376)
* Remove addon manager [#6334](https://github.com/kubernetes/minikube/pull/6334)
* Remove unnecessary crio restart to improve start latency [#6369](https://github.com/kubernetes/minikube/pull/6369)
* Check for nil ref and img before passing them into go-containerregistry [#6236](https://github.com/kubernetes/minikube/pull/6236)
* Change the compression methods used on the iso [#6341](https://github.com/kubernetes/minikube/pull/6341)
* Update the crio.conf instead of overwriting it [#6219](https://github.com/kubernetes/minikube/pull/6219)
* Update Japanese translation [#6339](https://github.com/kubernetes/minikube/pull/6339)
* Fix syntax of minikube kubectl example command [#6255](https://github.com/kubernetes/minikube/pull/6255)
* Stop minikube dashboard from crashing at start [#6325](https://github.com/kubernetes/minikube/pull/6325)
Thanks you to the following contributors:
- Anders F Björklund
- inductor
- Medya Ghazizadeh
- Naoki Oketani
- Priya Wadhwa
- Sharif Elgamal
- sshukun
- Thomas Strömberg
## Version 1.7.0-beta.0 - 2020-01-15
* add the ability to mark drivers as experimental [#6326](https://github.com/kubernetes/minikube/pull/6326)
......
......@@ -400,7 +400,7 @@ func HostPortBinding(ociBinary string, ociID string, contPort int) (int, error)
cmd := exec.Command(ociBinary, "inspect", "-f", fmt.Sprintf("'{{(index (index .NetworkSettings.Ports \"%d/tcp\") 0).HostPort}}'", contPort), ociID)
out, err := cmd.CombinedOutput()
if err != nil {
return 0, errors.Wrapf(err, "getting host-bind port %q for container ID %q", contPort, ociID)
return 0, errors.Wrapf(err, "getting host-bind port %d for container ID %q, output %s", contPort, ociID, out)
}
o := strings.Trim(string(out), "\n")
o = strings.Trim(o, "'")
......
......@@ -39,6 +39,7 @@ import (
"k8s.io/client-go/kubernetes"
kconst "k8s.io/kubernetes/cmd/kubeadm/app/constants"
"k8s.io/minikube/pkg/drivers/kic"
"k8s.io/minikube/pkg/drivers/kic/oci"
"k8s.io/minikube/pkg/kapi"
"k8s.io/minikube/pkg/minikube/assets"
"k8s.io/minikube/pkg/minikube/bootstrapper"
......@@ -249,7 +250,7 @@ func (k *Bootstrapper) StartCluster(cfg config.MachineConfig) error {
if !driver.IsKIC(cfg.VMDriver) { // TODO: skip for both after verifications https://github.com/kubernetes/minikube/issues/6239
glog.Infof("Configuring cluster permissions ...")
elevate := func() error {
client, err := k.client(cp)
client, err := k.client(cp.IP, cp.Port)
if err != nil {
return err
}
......@@ -269,7 +270,7 @@ func (k *Bootstrapper) StartCluster(cfg config.MachineConfig) error {
}
// client sets and returns a Kubernetes client to use to speak to a kubeadm launched apiserver
func (k *Bootstrapper) client(n config.Node) (*kubernetes.Clientset, error) {
func (k *Bootstrapper) client(ip string, port int) (*kubernetes.Clientset, error) {
if k.k8sClient != nil {
return k.k8sClient, nil
}
......@@ -279,7 +280,7 @@ func (k *Bootstrapper) client(n config.Node) (*kubernetes.Clientset, error) {
return nil, errors.Wrap(err, "client config")
}
endpoint := fmt.Sprintf("https://%s", net.JoinHostPort(n.IP, strconv.Itoa(n.Port)))
endpoint := fmt.Sprintf("https://%s", net.JoinHostPort(ip, strconv.Itoa(port)))
if cc.Host != endpoint {
glog.Errorf("Overriding stale ClientConfig host %s with %s", cc.Host, endpoint)
cc.Host = endpoint
......@@ -302,11 +303,21 @@ func (k *Bootstrapper) WaitForCluster(cfg config.MachineConfig, timeout time.Dur
if err := kverify.APIServerProcess(k.c, start, timeout); err != nil {
return err
}
if err := kverify.APIServerIsRunning(start, cp.IP, cp.Port, timeout); err != nil {
ip := cp.IP
port := cp.Port
if driver.IsKIC(cfg.VMDriver) {
ip = kic.DefaultBindIPV4
port, err = oci.HostPortBinding(cfg.VMDriver, cfg.Name, port)
if err != nil {
return errors.Wrapf(err, "get host-bind port %d for container %s", port, cfg.Name)
}
}
if err := kverify.APIServerIsRunning(start, ip, port, timeout); err != nil {
return err
}
c, err := k.client(cp)
c, err := k.client(ip, port)
if err != nil {
return errors.Wrap(err, "get k8s client")
}
......@@ -361,7 +372,7 @@ func (k *Bootstrapper) restartCluster(cfg config.MachineConfig) error {
}
for _, n := range cfg.Nodes {
client, err := k.client(n)
client, err := k.client(n.IP, n.Port)
if err != nil {
return errors.Wrap(err, "getting k8s client")
}
......
......@@ -43,12 +43,13 @@ func init() {
func configure(mc config.MachineConfig) interface{} {
return kic.NewDriver(kic.Config{
MachineName: mc.Name,
StorePath: localpath.MiniPath(),
ImageDigest: kic.BaseImage,
CPU: mc.CPUs,
Memory: mc.Memory,
OCIBinary: oci.Docker,
MachineName: mc.Name,
StorePath: localpath.MiniPath(),
ImageDigest: kic.BaseImage,
CPU: mc.CPUs,
Memory: mc.Memory,
OCIBinary: oci.Docker,
APIServerPort: mc.Nodes[0].Port,
})
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment