diff --git a/test/e2e/BUILD b/test/e2e/BUILD index 8feb4beb826..740e5953a7b 100644 --- a/test/e2e/BUILD +++ b/test/e2e/BUILD @@ -21,8 +21,9 @@ go_test( "//pkg/client/clientset_generated/clientset:go_default_library", "//test/e2e/apimachinery:go_default_library", "//test/e2e/autoscaling:go_default_library", - "//test/e2e/cluster-logging:go_default_library", "//test/e2e/framework:go_default_library", + "//test/e2e/instrumentation/logging:go_default_library", + "//test/e2e/instrumentation/monitoring:go_default_library", "//test/e2e/kubectl:go_default_library", "//test/e2e/metrics:go_default_library", "//test/e2e/scalability:go_default_library", @@ -48,7 +49,6 @@ go_library( "addon_update.go", "apparmor.go", "audit.go", - "cadvisor.go", "certificates.go", "cluster_upgrade.go", "dashboard.go", @@ -65,13 +65,10 @@ go_library( "gke_node_pools.go", "ha_master.go", "ingress.go", - "kibana_logging.go", "kube_proxy.go", "kubelet.go", "kubelet_perf.go", "limit_range.go", - "logging_soak.go", - "monitoring.go", "network_partition.go", "network_policy.go", "networking.go", @@ -93,7 +90,6 @@ go_library( "service_latency.go", "serviceloadbalancers.go", "ssh.go", - "stackdriver_monitoring.go", "ubernetes_lite.go", "util_iperf.go", ], @@ -134,14 +130,11 @@ go_library( "//test/utils/junit:go_default_library", "//vendor/github.com/golang/glog:go_default_library", "//vendor/github.com/google/cadvisor/info/v1:go_default_library", - "//vendor/github.com/influxdata/influxdb/client/v2:go_default_library", "//vendor/github.com/onsi/ginkgo:go_default_library", "//vendor/github.com/onsi/ginkgo/config:go_default_library", "//vendor/github.com/onsi/ginkgo/reporters:go_default_library", "//vendor/github.com/onsi/gomega:go_default_library", "//vendor/golang.org/x/crypto/ssh:go_default_library", - "//vendor/golang.org/x/oauth2/google:go_default_library", - "//vendor/google.golang.org/api/monitoring/v3:go_default_library", "//vendor/k8s.io/api/batch/v1:go_default_library", "//vendor/k8s.io/api/batch/v2alpha1:go_default_library", "//vendor/k8s.io/api/certificates/v1beta1:go_default_library", @@ -195,10 +188,10 @@ filegroup( "//test/e2e/apimachinery:all-srcs", "//test/e2e/autoscaling:all-srcs", "//test/e2e/chaosmonkey:all-srcs", - "//test/e2e/cluster-logging:all-srcs", "//test/e2e/common:all-srcs", "//test/e2e/framework:all-srcs", "//test/e2e/generated:all-srcs", + "//test/e2e/instrumentation:all-srcs", "//test/e2e/kubectl:all-srcs", "//test/e2e/manifest:all-srcs", "//test/e2e/metrics:all-srcs", diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index e9069419055..04af948691a 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -21,8 +21,9 @@ import ( _ "k8s.io/kubernetes/test/e2e/apimachinery" _ "k8s.io/kubernetes/test/e2e/autoscaling" - _ "k8s.io/kubernetes/test/e2e/cluster-logging" "k8s.io/kubernetes/test/e2e/framework" + _ "k8s.io/kubernetes/test/e2e/instrumentation/logging" + _ "k8s.io/kubernetes/test/e2e/instrumentation/monitoring" _ "k8s.io/kubernetes/test/e2e/kubectl" _ "k8s.io/kubernetes/test/e2e/scalability" _ "k8s.io/kubernetes/test/e2e/scheduling" diff --git a/test/e2e/instrumentation/BUILD b/test/e2e/instrumentation/BUILD new file mode 100644 index 00000000000..5fdcf57ebca --- /dev/null +++ b/test/e2e/instrumentation/BUILD @@ -0,0 +1,32 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = ["framework.go"], + tags = ["automanaged"], + deps = ["//vendor/github.com/onsi/ginkgo:go_default_library"], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//test/e2e/instrumentation/logging:all-srcs", + "//test/e2e/instrumentation/monitoring:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/test/e2e/instrumentation/OWNERS b/test/e2e/instrumentation/OWNERS new file mode 100644 index 00000000000..3d75e7e79b9 --- /dev/null +++ b/test/e2e/instrumentation/OWNERS @@ -0,0 +1,9 @@ +approvers: +- crassirostris +- DirectXMan12 +- fabxc +- fgrzadkowski +- piosz +- x13n +reviewers: +- sig-instrumentation-pr-reviews diff --git a/test/e2e/instrumentation/framework.go b/test/e2e/instrumentation/framework.go new file mode 100644 index 00000000000..b58c40f4162 --- /dev/null +++ b/test/e2e/instrumentation/framework.go @@ -0,0 +1,23 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package instrumentation + +import "github.com/onsi/ginkgo" + +func SIGDescribe(text string, body func()) bool { + return ginkgo.Describe("[sig-instrumentation] "+text, body) +} diff --git a/test/e2e/cluster-logging/BUILD b/test/e2e/instrumentation/logging/BUILD similarity index 93% rename from test/e2e/cluster-logging/BUILD rename to test/e2e/instrumentation/logging/BUILD index 0e99935a4d5..4285e4a9c0c 100644 --- a/test/e2e/cluster-logging/BUILD +++ b/test/e2e/instrumentation/logging/BUILD @@ -11,7 +11,9 @@ go_library( name = "go_default_library", srcs = [ "es.go", + "es_kibana.go", "es_utils.go", + "generic_soak.go", "sd.go", "sd_events.go", "sd_soak.go", @@ -22,6 +24,7 @@ go_library( deps = [ "//pkg/api:go_default_library", "//test/e2e/framework:go_default_library", + "//test/e2e/instrumentation:go_default_library", "//vendor/github.com/onsi/ginkgo:go_default_library", "//vendor/github.com/onsi/gomega:go_default_library", "//vendor/golang.org/x/net/context:go_default_library", diff --git a/test/e2e/cluster-logging/OWNERS b/test/e2e/instrumentation/logging/OWNERS similarity index 100% rename from test/e2e/cluster-logging/OWNERS rename to test/e2e/instrumentation/logging/OWNERS diff --git a/test/e2e/cluster-logging/es.go b/test/e2e/instrumentation/logging/es.go similarity index 91% rename from test/e2e/cluster-logging/es.go rename to test/e2e/instrumentation/logging/es.go index 21bb4d24bf9..f6a9770f4d9 100644 --- a/test/e2e/cluster-logging/es.go +++ b/test/e2e/instrumentation/logging/es.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package logging import ( "fmt" @@ -22,11 +22,12 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/test/e2e/framework" + "k8s.io/kubernetes/test/e2e/instrumentation" . "github.com/onsi/ginkgo" ) -var _ = framework.KubeDescribe("Cluster level logging using Elasticsearch [Feature:Elasticsearch]", func() { +var _ = instrumentation.SIGDescribe("Cluster level logging using Elasticsearch [Feature:Elasticsearch]", func() { f := framework.NewDefaultFramework("es-logging") BeforeEach(func() { diff --git a/test/e2e/kibana_logging.go b/test/e2e/instrumentation/logging/es_kibana.go similarity index 94% rename from test/e2e/kibana_logging.go rename to test/e2e/instrumentation/logging/es_kibana.go index bf1565cf1e6..f93bb45c268 100644 --- a/test/e2e/kibana_logging.go +++ b/test/e2e/instrumentation/logging/es_kibana.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package logging import ( "context" @@ -23,12 +23,13 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/kubernetes/test/e2e/framework" + "k8s.io/kubernetes/test/e2e/instrumentation" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) -var _ = framework.KubeDescribe("Kibana Logging Instances Is Alive [Feature:Elasticsearch]", func() { +var _ = instrumentation.SIGDescribe("Kibana Logging Instances Is Alive [Feature:Elasticsearch]", func() { f := framework.NewDefaultFramework("kibana-logging") BeforeEach(func() { diff --git a/test/e2e/cluster-logging/es_utils.go b/test/e2e/instrumentation/logging/es_utils.go similarity index 99% rename from test/e2e/cluster-logging/es_utils.go rename to test/e2e/instrumentation/logging/es_utils.go index d28237a8202..9737981ee6c 100644 --- a/test/e2e/cluster-logging/es_utils.go +++ b/test/e2e/instrumentation/logging/es_utils.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package logging import ( "encoding/json" diff --git a/test/e2e/logging_soak.go b/test/e2e/instrumentation/logging/generic_soak.go similarity index 96% rename from test/e2e/logging_soak.go rename to test/e2e/instrumentation/logging/generic_soak.go index 98b54fd3729..5250d5590f3 100644 --- a/test/e2e/logging_soak.go +++ b/test/e2e/instrumentation/logging/generic_soak.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package logging import ( "fmt" @@ -27,9 +27,10 @@ import ( . "github.com/onsi/gomega" "k8s.io/api/core/v1" "k8s.io/kubernetes/test/e2e/framework" + "k8s.io/kubernetes/test/e2e/instrumentation" ) -var _ = framework.KubeDescribe("Logging soak [Performance] [Slow] [Disruptive]", func() { +var _ = instrumentation.SIGDescribe("Logging soak [Performance] [Slow] [Disruptive]", func() { f := framework.NewDefaultFramework("logging-soak") diff --git a/test/e2e/cluster-logging/sd.go b/test/e2e/instrumentation/logging/sd.go similarity index 91% rename from test/e2e/cluster-logging/sd.go rename to test/e2e/instrumentation/logging/sd.go index 60fdf871739..bc12b0c7917 100644 --- a/test/e2e/cluster-logging/sd.go +++ b/test/e2e/instrumentation/logging/sd.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package logging import ( "fmt" @@ -22,11 +22,12 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/test/e2e/framework" + "k8s.io/kubernetes/test/e2e/instrumentation" . "github.com/onsi/ginkgo" ) -var _ = framework.KubeDescribe("Cluster level logging implemented by Stackdriver", func() { +var _ = instrumentation.SIGDescribe("Cluster level logging implemented by Stackdriver", func() { f := framework.NewDefaultFramework("sd-logging") BeforeEach(func() { diff --git a/test/e2e/cluster-logging/sd_events.go b/test/e2e/instrumentation/logging/sd_events.go similarity index 94% rename from test/e2e/cluster-logging/sd_events.go rename to test/e2e/instrumentation/logging/sd_events.go index 1440b99322e..10ec311f93f 100644 --- a/test/e2e/cluster-logging/sd_events.go +++ b/test/e2e/instrumentation/logging/sd_events.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package logging import ( "time" @@ -22,6 +22,7 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/test/e2e/framework" + "k8s.io/kubernetes/test/e2e/instrumentation" . "github.com/onsi/ginkgo" ) @@ -40,7 +41,7 @@ const ( eventCreationInterval = 10 * time.Second ) -var _ = framework.KubeDescribe("Cluster level logging implemented by Stackdriver", func() { +var _ = instrumentation.SIGDescribe("Cluster level logging implemented by Stackdriver", func() { f := framework.NewDefaultFramework("sd-logging-events") BeforeEach(func() { diff --git a/test/e2e/cluster-logging/sd_soak.go b/test/e2e/instrumentation/logging/sd_soak.go similarity index 93% rename from test/e2e/cluster-logging/sd_soak.go rename to test/e2e/instrumentation/logging/sd_soak.go index c1d2f657b03..cdbcf8fbffc 100644 --- a/test/e2e/cluster-logging/sd_soak.go +++ b/test/e2e/instrumentation/logging/sd_soak.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package logging import ( "fmt" @@ -23,6 +23,7 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/test/e2e/framework" + "k8s.io/kubernetes/test/e2e/instrumentation" . "github.com/onsi/ginkgo" ) @@ -39,7 +40,7 @@ const ( lastPodIngestionSlack = 5 * time.Minute ) -var _ = framework.KubeDescribe("Cluster level logging implemented by Stackdriver [Feature:StackdriverLogging] [Soak]", func() { +var _ = instrumentation.SIGDescribe("Cluster level logging implemented by Stackdriver [Feature:StackdriverLogging] [Soak]", func() { f := framework.NewDefaultFramework("sd-logging-load") It("should ingest logs from applications running for a prolonged amount of time", func() { diff --git a/test/e2e/cluster-logging/sd_utils.go b/test/e2e/instrumentation/logging/sd_utils.go similarity index 99% rename from test/e2e/cluster-logging/sd_utils.go rename to test/e2e/instrumentation/logging/sd_utils.go index f5be7191f1f..f8c6210e7fa 100644 --- a/test/e2e/cluster-logging/sd_utils.go +++ b/test/e2e/instrumentation/logging/sd_utils.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package logging import ( "encoding/base64" diff --git a/test/e2e/cluster-logging/utils.go b/test/e2e/instrumentation/logging/utils.go similarity index 99% rename from test/e2e/cluster-logging/utils.go rename to test/e2e/instrumentation/logging/utils.go index f87b2575f8c..b2c7a43cabe 100644 --- a/test/e2e/cluster-logging/utils.go +++ b/test/e2e/instrumentation/logging/utils.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package logging import ( "fmt" diff --git a/test/e2e/instrumentation/monitoring/BUILD b/test/e2e/instrumentation/monitoring/BUILD new file mode 100644 index 00000000000..d5c0267df35 --- /dev/null +++ b/test/e2e/instrumentation/monitoring/BUILD @@ -0,0 +1,44 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = [ + "cadvisor.go", + "influxdb.go", + "stackdriver.go", + ], + tags = ["automanaged"], + deps = [ + "//pkg/client/clientset_generated/clientset:go_default_library", + "//test/e2e/common:go_default_library", + "//test/e2e/framework:go_default_library", + "//test/e2e/instrumentation:go_default_library", + "//vendor/github.com/influxdata/influxdb/client/v2:go_default_library", + "//vendor/github.com/onsi/ginkgo:go_default_library", + "//vendor/golang.org/x/oauth2/google:go_default_library", + "//vendor/google.golang.org/api/monitoring/v3:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) diff --git a/test/e2e/cadvisor.go b/test/e2e/instrumentation/monitoring/cadvisor.go similarity index 94% rename from test/e2e/cadvisor.go rename to test/e2e/instrumentation/monitoring/cadvisor.go index 8fc5c017066..565b3fc7b56 100644 --- a/test/e2e/cadvisor.go +++ b/test/e2e/instrumentation/monitoring/cadvisor.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package monitoring import ( "fmt" @@ -23,11 +23,12 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/test/e2e/framework" + "k8s.io/kubernetes/test/e2e/instrumentation" . "github.com/onsi/ginkgo" ) -var _ = framework.KubeDescribe("Cadvisor", func() { +var _ = instrumentation.SIGDescribe("Cadvisor", func() { f := framework.NewDefaultFramework("cadvisor") diff --git a/test/e2e/monitoring.go b/test/e2e/instrumentation/monitoring/influxdb.go similarity index 98% rename from test/e2e/monitoring.go rename to test/e2e/instrumentation/monitoring/influxdb.go index 18128f09205..5afb7dbeaa4 100644 --- a/test/e2e/monitoring.go +++ b/test/e2e/instrumentation/monitoring/influxdb.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package monitoring import ( "bytes" @@ -29,11 +29,12 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/test/e2e/framework" + "k8s.io/kubernetes/test/e2e/instrumentation" . "github.com/onsi/ginkgo" ) -var _ = framework.KubeDescribe("Monitoring", func() { +var _ = instrumentation.SIGDescribe("Monitoring", func() { f := framework.NewDefaultFramework("monitoring") BeforeEach(func() { diff --git a/test/e2e/stackdriver_monitoring.go b/test/e2e/instrumentation/monitoring/stackdriver.go similarity index 97% rename from test/e2e/stackdriver_monitoring.go rename to test/e2e/instrumentation/monitoring/stackdriver.go index f175c13e7d3..0c41722e077 100644 --- a/test/e2e/stackdriver_monitoring.go +++ b/test/e2e/instrumentation/monitoring/stackdriver.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package monitoring import ( "context" @@ -29,6 +29,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/test/e2e/common" "k8s.io/kubernetes/test/e2e/framework" + "k8s.io/kubernetes/test/e2e/instrumentation" gcm "google.golang.org/api/monitoring/v3" ) @@ -57,7 +58,7 @@ var ( tolerance = 0.25 ) -var _ = framework.KubeDescribe("Stackdriver Monitoring", func() { +var _ = instrumentation.SIGDescribe("Stackdriver Monitoring", func() { BeforeEach(func() { framework.SkipUnlessProviderIs("gke") })