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

Upgrade tests 1.13 #73965

Merged
merged 2 commits into from
Feb 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions test/e2e/auth/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ go_library(
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/version:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/apis/audit/v1beta1:go_default_library",
Expand Down
10 changes: 9 additions & 1 deletion test/e2e/auth/metadata_concealment.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
batch "k8s.io/api/batch/v1"
"k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
utilversion "k8s.io/apimachinery/pkg/util/version"
"k8s.io/kubernetes/test/e2e/framework"

. "github.com/onsi/ginkgo"
Expand All @@ -32,6 +33,13 @@ var _ = SIGDescribe("Metadata Concealment", func() {

It("should run a check-metadata-concealment job to completion", func() {
framework.SkipUnlessProviderIs("gce")

concealmentTestImage := imageutil.CheckMetadataConcealment
if gte, _ := framework.ServerVersionGTE(utilversion.MustParseSemantic("v1.14.0-alpha.0"), f.ClientSet.Discovery()); gte {
framework.Logf("using metadata concealment image 1.2 for 1.14+ server")
concealmentTestImage = imageutil.CheckMetadataConcealment1_2
}

By("Creating a job")
job := &batch.Job{
ObjectMeta: metav1.ObjectMeta{
Expand All @@ -46,7 +54,7 @@ var _ = SIGDescribe("Metadata Concealment", func() {
Containers: []v1.Container{
{
Name: "check-metadata-concealment",
Image: imageutil.GetE2EImage(imageutil.CheckMetadataConcealment),
Image: imageutil.GetE2EImage(concealmentTestImage),
},
},
RestartPolicy: v1.RestartPolicyOnFailure,
Expand Down
1 change: 1 addition & 0 deletions test/e2e/network/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ go_library(
"//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/version:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/authentication/serviceaccount:go_default_library",
Expand Down
10 changes: 9 additions & 1 deletion test/e2e/network/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"net/http"

"k8s.io/apimachinery/pkg/util/sets"
utilversion "k8s.io/apimachinery/pkg/util/version"
"k8s.io/kubernetes/pkg/master/ports"
"k8s.io/kubernetes/test/e2e/framework"

Expand Down Expand Up @@ -59,14 +60,21 @@ var _ = SIGDescribe("Networking", func() {

// First test because it has no dependencies on variables created later on.
It("should provide unchanging, static URL paths for kubernetes api services", func() {

openapiPath := "/swaggerapi"
if gte, _ := framework.ServerVersionGTE(utilversion.MustParseSemantic("v1.14.0-alpha.0"), f.ClientSet.Discovery()); gte {
framework.Logf("using newer openapi path for 1.14+ server")
openapiPath = "/openapi/v2"
}

tests := []struct {
path string
}{
{path: "/healthz"},
{path: "/api"},
{path: "/apis"},
{path: "/metrics"},
{path: "/swaggerapi"},
{path: openapiPath},
{path: "/version"},
// TODO: test proxy links here
}
Expand Down
3 changes: 3 additions & 0 deletions test/utils/image/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ var (
VolumeISCSIServer = Config{e2eRegistry, "volume/iscsi", "1.0"}
VolumeGlusterServer = Config{e2eRegistry, "volume/gluster", "1.0"}
VolumeRBDServer = Config{e2eRegistry, "volume/rbd", "1.0.1"}

// Use a newer version of the metadata concealment check on 1.14+ servers. See http://issue.k8s.io/71094
CheckMetadataConcealment1_2 = Config{e2eRegistry, "metadata-concealment", "1.2"}
)

// GetE2EImage returns the fully qualified URI to an image (including version)
Expand Down