Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🏃[e2e] add kube-proxy version check #2773

Merged
merged 1 commit into from
Mar 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions test/infrastructure/docker/e2e/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ import (

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"k8s.io/apimachinery/pkg/runtime"

appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha3"
bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha3"
"sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/v1beta1"
Expand All @@ -47,8 +48,9 @@ var cluster *clusterv1.Cluster
var _ = Describe("Docker", func() {
Describe("Cluster Creation", func() {
var (
namespace string
clusterGen = &ClusterGenerator{}
namespace string
clusterGen = &ClusterGenerator{}
workloadClient ctrlclient.Client
)
SetDefaultEventuallyTimeout(3 * time.Minute)
SetDefaultEventuallyPollingInterval(10 * time.Second)
Expand Down Expand Up @@ -125,7 +127,7 @@ var _ = Describe("Docker", func() {
framework.WaitForOneKubeadmControlPlaneMachineToExist(ctx, waitForOneKubeadmControlPlaneMachineToExistInput, "5m")

// Insatll a networking solution on the workload cluster
workloadClient, err := mgmt.GetWorkloadClient(ctx, cluster.Namespace, cluster.Name)
workloadClient, err = mgmt.GetWorkloadClient(ctx, cluster.Namespace, cluster.Name)
Expect(err).ToNot(HaveOccurred())
applyYAMLURLInput := framework.ApplyYAMLURLInput{
Client: workloadClient,
Expand Down Expand Up @@ -213,6 +215,19 @@ var _ = Describe("Docker", func() {
}
return upgraded, nil
}, "10m", "30s").Should(Equal(int(*controlPlane.Spec.Replicas)))
Eventually(func() (bool, error) {
ds := &appsv1.DaemonSet{}

sedefsavas marked this conversation as resolved.
Show resolved Hide resolved
if err := workloadClient.Get(ctx, ctrlclient.ObjectKey{Name: "kube-proxy", Namespace: metav1.NamespaceSystem}, ds); err != nil {
return false, err
}
if ds.Spec.Template.Spec.Containers[0].Image == "k8s.gcr.io/kube-proxy:v1.17.2" {
sedefsavas marked this conversation as resolved.
Show resolved Hide resolved
return true, nil
}

return false, nil
}, "10m", "30s").Should(BeTrue())

})
})
})
Expand Down