Skip to content

Commit

Permalink
Update kube dependency to 1.15
Browse files Browse the repository at this point in the history
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
  • Loading branch information
humblec committed Jun 21, 2019
1 parent 7f99370 commit ca5ffbf
Show file tree
Hide file tree
Showing 1,017 changed files with 39,397 additions and 182,763 deletions.
348 changes: 142 additions & 206 deletions Gopkg.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@
version = "1.10.0"

[[constraint]]
version = "kubernetes-1.14.2"
version = "kubernetes-1.15.0"
name = "k8s.io/apimachinery"

[[constraint]]
name = "k8s.io/kubernetes"
version = "=v1.14.2"
version = "=v1.15.0"

[[override]]
version = "kubernetes-1.14.2"
version = "kubernetes-1.15.0"
name = "k8s.io/api"

[[override]]
version = "kubernetes-1.14.2"
version = "kubernetes-1.15.0"
name = "k8s.io/apiserver"

[[override]]
version = "kubernetes-1.14.2"
version = "kubernetes-1.15.0"
name = "k8s.io/cli-runtime"

[[override]]
Expand All @@ -41,15 +41,15 @@

[[constraint]]
name = "k8s.io/client-go"
version = "kubernetes-1.14.2"
version = "kubernetes-1.15.0"

[[override]]
name = "k8s.io/apiextensions-apiserver"
version = "kubernetes-1.14.2"
version = "kubernetes-1.15.0"

[[override]]
name = "k8s.io/kube-aggregator"
version = "kubernetes-1.14.2"
version = "kubernetes-1.15.0"

[prune]
go-tests = true
Expand Down
3 changes: 2 additions & 1 deletion e2e/deploy-rook.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/kubernetes/test/e2e/framework"
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
)

var (
Expand All @@ -21,7 +22,7 @@ func formRookURL(version string) {
}

func getK8sClient() kubernetes.Interface {
framework.Logf("Creating a kubernetes client")
e2elog.Logf("Creating a kubernetes client")
client, err := framework.LoadClientset()
Expect(err).Should(BeNil())
return client
Expand Down
3 changes: 2 additions & 1 deletion e2e/rbd.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
. "github.com/onsi/ginkgo" // nolint

"k8s.io/kubernetes/test/e2e/framework"
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
)

var (
Expand Down Expand Up @@ -45,7 +46,7 @@ var _ = Describe("RBD", func() {
rbdFiles := getFilesinDirectory(rbdDirPath)
for _, file := range rbdFiles {
res, err := framework.RunKubectl("delete", "-f", rbdDirPath+file.Name())
framework.Logf("failed to delete resource in %s with err %v", res, err)
e2elog.Logf("failed to delete resource in %s with err %v", res, err)
}
deleteRBDPool()
deleteSecret(rbdExamplePath + "secret.yaml")
Expand Down
33 changes: 17 additions & 16 deletions e2e/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
clientset "k8s.io/client-go/kubernetes"
"k8s.io/kubernetes/pkg/client/conditions"
"k8s.io/kubernetes/test/e2e/framework"
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
testutils "k8s.io/kubernetes/test/utils"
)

Expand All @@ -39,13 +40,13 @@ var poll = 2 * time.Second
func waitForDaemonSets(name, ns string, c clientset.Interface, t int) error {
timeout := time.Duration(t) * time.Minute
start := time.Now()
framework.Logf("Waiting up to %v for all daemonsets in namespace '%s' to start",
e2elog.Logf("Waiting up to %v for all daemonsets in namespace '%s' to start",
timeout, ns)

return wait.PollImmediate(poll, timeout, func() (bool, error) {
ds, err := c.AppsV1().DaemonSets(ns).Get(name, metav1.GetOptions{})
if err != nil {
framework.Logf("Error getting daemonsets in namespace: '%s': %v", ns, err)
e2elog.Logf("Error getting daemonsets in namespace: '%s': %v", ns, err)
if strings.Contains(err.Error(), "not found") {
return false, nil
}
Expand All @@ -56,7 +57,7 @@ func waitForDaemonSets(name, ns string, c clientset.Interface, t int) error {
}
dNum := ds.Status.DesiredNumberScheduled
ready := ds.Status.NumberReady
framework.Logf("%d / %d pods ready in namespace '%s' in daemonset '%s' (%d seconds elapsed)", ready, dNum, ns, ds.ObjectMeta.Name, int(time.Since(start).Seconds()))
e2elog.Logf("%d / %d pods ready in namespace '%s' in daemonset '%s' (%d seconds elapsed)", ready, dNum, ns, ds.ObjectMeta.Name, int(time.Since(start).Seconds()))
if ready != dNum {
return false, nil
}
Expand Down Expand Up @@ -89,7 +90,7 @@ func waitForDeploymentComplete(name, ns string, c clientset.Interface, t int) er
}

reason = fmt.Sprintf("deployment status: %#v", deployment.Status)
framework.Logf(reason)
e2elog.Logf(reason)

return false, nil
})
Expand Down Expand Up @@ -281,13 +282,13 @@ func createPVCAndvalidatePV(c kubernetes.Interface, pvc *v1.PersistentVolumeClai
Expect(err).Should(BeNil())
name := pvc.Name
start := time.Now()
framework.Logf("Waiting up to %v to be in Bound state", pvc)
e2elog.Logf("Waiting up to %v to be in Bound state", pvc)

return wait.PollImmediate(poll, timeout, func() (bool, error) {
framework.Logf("waiting for PVC %s (%d seconds elapsed)", pvc.Name, int(time.Since(start).Seconds()))
e2elog.Logf("waiting for PVC %s (%d seconds elapsed)", pvc.Name, int(time.Since(start).Seconds()))
pvc, err = c.CoreV1().PersistentVolumeClaims(pvc.Namespace).Get(name, metav1.GetOptions{})
if err != nil {
framework.Logf("Error getting pvc in namespace: '%s': %v", pvc.Namespace, err)
e2elog.Logf("Error getting pvc in namespace: '%s': %v", pvc.Namespace, err)
if testutils.IsRetryableAPIError(err) {
return false, nil
}
Expand Down Expand Up @@ -319,7 +320,7 @@ func deletePVCAndValidatePV(c kubernetes.Interface, pvc *v1.PersistentVolumeClai
nameSpace := pvc.Namespace
name := pvc.Name
var err error
framework.Logf("Deleting PersistentVolumeClaim %v on namespace %v", name, nameSpace)
e2elog.Logf("Deleting PersistentVolumeClaim %v on namespace %v", name, nameSpace)

pvc, err = c.CoreV1().PersistentVolumeClaims(nameSpace).Get(name, metav1.GetOptions{})
if err != nil {
Expand All @@ -337,7 +338,7 @@ func deletePVCAndValidatePV(c kubernetes.Interface, pvc *v1.PersistentVolumeClai
start := time.Now()
return wait.PollImmediate(poll, timeout, func() (bool, error) {
// Check that the PVC is really deleted.
framework.Logf("waiting for PVC %s in state %s to be deleted (%d seconds elapsed)", name, pvc.Status.String(), int(time.Since(start).Seconds()))
e2elog.Logf("waiting for PVC %s in state %s to be deleted (%d seconds elapsed)", name, pvc.Status.String(), int(time.Since(start).Seconds()))
pvc, err = c.CoreV1().PersistentVolumeClaims(nameSpace).Get(name, metav1.GetOptions{})
if err == nil {
return false, nil
Expand Down Expand Up @@ -396,7 +397,7 @@ func getPodName(ns string, c kubernetes.Interface, opt *metav1.ListOptions) stri
func waitForPodInRunningState(name, ns string, c kubernetes.Interface, t int) error {
timeout := time.Duration(t) * time.Minute
start := time.Now()
framework.Logf("Waiting up to %v to be in Running state", name)
e2elog.Logf("Waiting up to %v to be in Running state", name)
return wait.PollImmediate(poll, timeout, func() (bool, error) {
pod, err := c.CoreV1().Pods(ns).Get(name, metav1.GetOptions{})
if err != nil {
Expand All @@ -408,7 +409,7 @@ func waitForPodInRunningState(name, ns string, c kubernetes.Interface, t int) er
case v1.PodFailed, v1.PodSucceeded:
return false, conditions.ErrPodCompleted
}
framework.Logf("%s app is in %s phase expected to be in Running state (%d seconds elapsed)", name, pod.Status.Phase, int(time.Since(start).Seconds()))
e2elog.Logf("%s app is in %s phase expected to be in Running state (%d seconds elapsed)", name, pod.Status.Phase, int(time.Since(start).Seconds()))
return false, nil
})
}
Expand All @@ -420,14 +421,14 @@ func deletePod(name, ns string, c kubernetes.Interface, t int) error {
return err
}
start := time.Now()
framework.Logf("Waiting for pod %v to be deleted", name)
e2elog.Logf("Waiting for pod %v to be deleted", name)
return wait.PollImmediate(poll, timeout, func() (bool, error) {
_, err := c.CoreV1().Pods(ns).Get(name, metav1.GetOptions{})

if apierrs.IsNotFound(err) {
return true, nil
}
framework.Logf("%s app to be deleted (%d seconds elapsed)", name, int(time.Since(start).Seconds()))
e2elog.Logf("%s app to be deleted (%d seconds elapsed)", name, int(time.Since(start).Seconds()))
if err != nil {
return false, err
}
Expand Down Expand Up @@ -459,7 +460,7 @@ func checkCephPods(ns string, c kubernetes.Interface, count, t int, opt *metav1.
return false, err
}

framework.Logf("pod count is %d expected count %d (%d seconds elapsed)", len(podList.Items), count, int(time.Since(start).Seconds()))
e2elog.Logf("pod count is %d expected count %d (%d seconds elapsed)", len(podList.Items), count, int(time.Since(start).Seconds()))

if len(podList.Items) >= count {
return true, nil
Expand All @@ -473,7 +474,7 @@ func checkCephPods(ns string, c kubernetes.Interface, count, t int, opt *metav1.
func validatePVCAndAppBinding(pvcPath, appPath string, f *framework.Framework) {
pvc := loadPVC(pvcPath)
pvc.Namespace = f.UniqueName
framework.Logf("The PVC template %+v", pvc)
e2elog.Logf("The PVC template %+v", pvc)
err := createPVCAndvalidatePV(f.ClientSet, pvc, deployTimeout)
if err != nil {
Fail(err.Error())
Expand Down Expand Up @@ -501,7 +502,7 @@ func validateNormalUserPVCAccess(pvcPath string, f *framework.Framework) {
pvc := loadPVC(pvcPath)
pvc.Namespace = f.UniqueName
pvc.Name = f.UniqueName
framework.Logf("The PVC template %+v", pvc)
e2elog.Logf("The PVC template %+v", pvc)
err := createPVCAndvalidatePV(f.ClientSet, pvc, deployTimeout)
if err != nil {
Fail(err.Error())
Expand Down
4 changes: 2 additions & 2 deletions pkg/rbd/nodeserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (ns *NodeServer) mountVolume(req *csi.NodePublishVolumeRequest, devicePath

func (ns *NodeServer) createTargetPath(targetPath string, isBlock bool) (bool, error) {
// Check if that target path exists properly
notMnt, err := ns.mounter.IsNotMountPoint(targetPath)
notMnt, err := mount.IsNotMountPoint(ns.mounter, targetPath)
if err != nil {
if os.IsNotExist(err) {
if isBlock {
Expand Down Expand Up @@ -209,7 +209,7 @@ func (ns *NodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpu
}
}()

notMnt, err := ns.mounter.IsNotMountPoint(targetPath)
notMnt, err := mount.IsNotMountPoint(ns.mounter, targetPath)
if err != nil {
if os.IsNotExist(err) {
// targetPath has already been deleted
Expand Down
3 changes: 2 additions & 1 deletion pkg/rbd/rbd.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/container-storage-interface/spec/lib/go/csi"
"k8s.io/klog"
"k8s.io/kubernetes/pkg/util/mount"
nsutil "k8s.io/kubernetes/pkg/volume/util/nsenter"
"k8s.io/utils/exec"
"k8s.io/utils/nsenter"
)
Expand Down Expand Up @@ -89,7 +90,7 @@ func NewNodeServer(d *csicommon.CSIDriver, containerized bool) (*NodeServer, err
if err != nil {
return nil, err
}
mounter = mount.NewNsenterMounter("", ne)
mounter = nsutil.NewMounter("", ne)
}
return &NodeServer{
DefaultNodeServer: csicommon.NewDefaultNodeServer(d),
Expand Down
22 changes: 22 additions & 0 deletions vendor/github.com/Microsoft/go-winio/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ca5ffbf

Please sign in to comment.