Commit 4c7e3263 authored by Alena Prokharchyk's avatar Alena Prokharchyk
Browse files

Vendor update for rke and metadata

parent 0df3bb6e
Showing with 34 additions and 17 deletions
+34 -17
......@@ -52,12 +52,12 @@ require (
github.com/pkg/errors v0.8.1
github.com/prometheus/client_golang v1.1.0
github.com/prometheus/common v0.6.0
github.com/rancher/kontainer-driver-metadata v0.0.0-20190903233325-0bbd16e747ff
github.com/rancher/kontainer-driver-metadata v0.0.0-20190905180018-bd99c3a44558
github.com/rancher/kontainer-engine v0.0.4-dev.0.20190819182532-d4cdf8e56671
github.com/rancher/norman v0.0.0-20190829223613-7317090b9b71
github.com/rancher/rdns-server v0.0.0-20180802070304-bf662911db6a
github.com/rancher/remotedialer v0.2.2
github.com/rancher/rke v0.3.0-rc9.0.20190903234659-23ea40fe2986
github.com/rancher/rke v0.3.0-rc9.0.20190905183653-96802dfc722c
github.com/rancher/types v0.0.0-20190830223007-e70505280772
github.com/rancher/wrangler v0.1.6-0.20190822171720-e78d8316ee95
github.com/robfig/cron v1.1.0
......
......@@ -276,8 +276,8 @@ github.com/rancher/client-go v1.14.5-rancher.1 h1:3lriccMjs8HpK4H3OyHo1a0GIvr0lO
github.com/rancher/client-go v1.14.5-rancher.1/go.mod h1:N4rIJ5TXwpEuCvEf9SJLCX2CqgSTIIyCK8zIV34IZhE=
github.com/rancher/kontainer-driver-metadata v0.0.0-20190819174335-6eb94126a98c h1:Of+EnlLZ33fmeZgQhr/Pb80iMaR9L8mQ2xvhzQk4o4w=
github.com/rancher/kontainer-driver-metadata v0.0.0-20190819174335-6eb94126a98c/go.mod h1:VDixap7YjDnNwlfxL4gl890ThOVinEZE3qyAaG0xcQE=
github.com/rancher/kontainer-driver-metadata v0.0.0-20190903233325-0bbd16e747ff h1:bcG5P+9M+WSqAVd8dsR+AYAEhnV1zdsbhRXXVTTDfNM=
github.com/rancher/kontainer-driver-metadata v0.0.0-20190903233325-0bbd16e747ff/go.mod h1:dHvhyuoiwrjqQCFD586g0cZ9NJJXEKeAtQi8RX96U8E=
github.com/rancher/kontainer-driver-metadata v0.0.0-20190905180018-bd99c3a44558 h1:v7ccMI1ni+hlEkLM+0k7YSkEOYUPWO1d+VNoe0iP8/4=
github.com/rancher/kontainer-driver-metadata v0.0.0-20190905180018-bd99c3a44558/go.mod h1:dHvhyuoiwrjqQCFD586g0cZ9NJJXEKeAtQi8RX96U8E=
github.com/rancher/kontainer-engine v0.0.4-dev.0.20190819182532-d4cdf8e56671 h1:JIgjMy2Nb/H+89T2S7TePqiGyxeE4J1g5tGtb9+hqsQ=
github.com/rancher/kontainer-engine v0.0.4-dev.0.20190819182532-d4cdf8e56671/go.mod h1:NHG6mh7mpbYOVbhw5f2eNPYWgMFZImfILcDL+U29kUI=
github.com/rancher/moq v0.0.0-20190404221404-ee5226d43009 h1:Xsxh7fX3+2wAUJtPy8g2lZh0cYuyifqhBL0vxCIYojs=
......@@ -295,8 +295,8 @@ github.com/rancher/remotedialer v0.2.2 h1:R0DNjBqLzLrhZTS+kbYi8E6qBmIOrzPwqoo1L7
github.com/rancher/remotedialer v0.2.2/go.mod h1:tkU8ZvrR5lRgaKWaX71nAy6daeqvPFx/lJEnbW7tXSI=
github.com/rancher/rke v0.3.0-rc6.0.20190819180243-f8bac2c059d0 h1:XYyvskgyYvU89CgHEl0XK3GDom+heEgl2s28jv/f6PM=
github.com/rancher/rke v0.3.0-rc6.0.20190819180243-f8bac2c059d0/go.mod h1:IyunvVrNJZLg3m5faCvG4LNAyf03vuAShBi9q9mcPGc=
github.com/rancher/rke v0.3.0-rc9.0.20190903234659-23ea40fe2986 h1:hYVmT5/Dek/G5pLdP1OflUmEKu2MgpJY2+8Rn8GAnYw=
github.com/rancher/rke v0.3.0-rc9.0.20190903234659-23ea40fe2986/go.mod h1:qv9RTwraQ7JPPv8GyBBI/vltp0nEMJGuNj4O4BoCaPo=
github.com/rancher/rke v0.3.0-rc9.0.20190905183653-96802dfc722c h1:/itIKWdb/nhIpq2lUCA2x+U8wQsLesALdx5jE3gD+N4=
github.com/rancher/rke v0.3.0-rc9.0.20190905183653-96802dfc722c/go.mod h1:hPChYcMdDwjQxR/WFvosZW++0frw+H2nO9Ni/L24OPI=
github.com/rancher/saml v0.0.0-20180713225824-ce1532152fde h1:+gd9up4jLeFeuNC5bHn7qfRXZO9WKtBe8b4vhucg9lg=
github.com/rancher/saml v0.0.0-20180713225824-ce1532152fde h1:+gd9up4jLeFeuNC5bHn7qfRXZO9WKtBe8b4vhucg9lg=
github.com/rancher/saml v0.0.0-20180713225824-ce1532152fde/go.mod h1:Bp1IBnlwVB1EqRfSKecoPyf+1Wjh8zykMjlq4vJJhxY=
......
......@@ -185,6 +185,8 @@ spec:
operator: NotIn
values:
- windows
- key: node-role.kubernetes.io/worker
operator: Exists
hostNetwork: true
{{if .DNSPolicy}}
dnsPolicy: {{.DNSPolicy}}
......@@ -644,6 +646,8 @@ spec:
operator: NotIn
values:
- windows
- key: node-role.kubernetes.io/worker
operator: Exists
terminationGracePeriodSeconds: 60
tolerations:
- effect: NoExecute
......
......@@ -507,7 +507,7 @@ func IsContainerUpgradable(ctx context.Context, dClient *client.Client, imageCfg
!sliceEqualsIgnoreOrder(containerInspect.Config.Cmd, imageCfg.Cmd) ||
!isContainerEnvChanged(containerInspect.Config.Env, imageCfg.Env, imageInspect.Config.Env) ||
!sliceEqualsIgnoreOrder(containerInspect.HostConfig.Binds, hostCfg.Binds) ||
!sliceEqualsIgnoreOrder(containerInspect.HostConfig.SecurityOpt, hostCfg.SecurityOpt) {
!securityOptsliceEqualsIgnoreOrder(containerInspect.HostConfig.SecurityOpt, hostCfg.SecurityOpt) {
logrus.Debugf("[%s] Container [%s] is eligible for upgrade on host [%s]", plane, containerName, hostname)
return true, nil
}
......@@ -518,6 +518,23 @@ func IsContainerUpgradable(ctx context.Context, dClient *client.Client, imageCfg
func sliceEqualsIgnoreOrder(left, right []string) bool {
if equal := sets.NewString(left...).Equal(sets.NewString(right...)); !equal {
logrus.Debugf("slice is not equal, showing data in new value which is not in old value: %v", sets.NewString(right...).Difference(sets.NewString(left...)))
logrus.Debugf("slice is not equal, showing data in old value which is not in new value: %v", sets.NewString(left...).Difference(sets.NewString(right...)))
return false
}
return true
}
func securityOptsliceEqualsIgnoreOrder(left, right []string) bool {
if equal := sets.NewString(left...).Equal(sets.NewString(right...)); !equal {
logrus.Debugf("slice is not equal, showing data in new value which is not in old value: %v", sets.NewString(right...).Difference(sets.NewString(left...)))
diff := sets.NewString(left...).Difference(sets.NewString(right...))
logrus.Debugf("slice is not equal, showing data in old value which is not in new value: %v", diff)
// Docker sets label=disable automatically on all non labeled containers with will result in a false diff between spec and the actual running container
// If the diff matches the disable label exactly, we still report true as being equal
if equal := sets.NewString([]string{"label=disable"}...).Equal(diff); equal {
logrus.Debugf("returning equal as true because diff matches the automatically added disable label for SELinux which can be ignored: %v", diff)
return true
}
return false
}
return true
......
......@@ -69,6 +69,9 @@ func checkDockerVersion(ctx context.Context, h *Host, clusterVersion string) err
}
logrus.Debugf("Docker Info found: %#v", info)
h.DockerInfo = info
if h.IgnoreDockerVersion {
return nil
}
K8sSemVer, err := util.StrToSemVer(clusterVersion)
if err != nil {
return fmt.Errorf("Error while parsing cluster version [%s]: %v", clusterVersion, err)
......@@ -79,10 +82,8 @@ func checkDockerVersion(ctx context.Context, h *Host, clusterVersion string) err
return fmt.Errorf("Error while determining supported Docker version [%s]: %v", info.ServerVersion, err)
}
if !isvalid && !h.IgnoreDockerVersion {
if !isvalid {
return fmt.Errorf("Unsupported Docker version found [%s], supported versions are %v", info.ServerVersion, metadata.K8sVersionToDockerVersions[K8sVersion])
} else if !isvalid {
log.Warnf(ctx, "Unsupported Docker version found [%s], supported versions are %v", info.ServerVersion, metadata.K8sVersionToDockerVersions[K8sVersion])
}
return nil
}
......
......@@ -6,7 +6,6 @@ import (
"encoding/json"
"fmt"
"io/ioutil"
"math/rand"
"net"
"net/http"
"strings"
......@@ -124,10 +123,6 @@ func GetEtcdConnString(hosts []*hosts.Host, hostAddress string) string {
}
connHosts = append(connHosts, "https://"+host.InternalAddress+":2379")
}
rand.Seed(time.Now().UnixNano())
rand.Shuffle(len(connHosts), func(i, j int) {
connHosts[i], connHosts[j] = connHosts[j], connHosts[i]
})
if containsHostAddress {
connHosts = append([]string{"https://" + hostAddress + ":2379"}, connHosts...)
}
......
......@@ -267,7 +267,7 @@ github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg
# github.com/prometheus/procfs v0.0.3
github.com/prometheus/procfs
github.com/prometheus/procfs/internal/fs
# github.com/rancher/kontainer-driver-metadata v0.0.0-20190903233325-0bbd16e747ff
# github.com/rancher/kontainer-driver-metadata v0.0.0-20190905180018-bd99c3a44558
github.com/rancher/kontainer-driver-metadata/rke
github.com/rancher/kontainer-driver-metadata/rke/templates
# github.com/rancher/kontainer-engine v0.0.4-dev.0.20190819182532-d4cdf8e56671
......@@ -332,7 +332,7 @@ github.com/rancher/norman/types/factory
github.com/rancher/rdns-server/model
# github.com/rancher/remotedialer v0.2.2
github.com/rancher/remotedialer
# github.com/rancher/rke v0.3.0-rc9.0.20190903234659-23ea40fe2986
# github.com/rancher/rke v0.3.0-rc9.0.20190905183653-96802dfc722c
github.com/rancher/rke/util
github.com/rancher/rke/pki/cert
github.com/rancher/rke/cloudprovider/aws
......
Supports Markdown
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