Merge pull request #53064 from msau42/allow-kubelet-metrics

Automatic merge from submit-queue (batch tested with PRs 52990, 53064, 52686, 52221, 53069). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Allow kubelet metrics tests to run on gke

**What this PR does / why we need it**:
On GKE, you can still access kubelet metrics, so allow the kubelet metrics test.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

NONE
pull/6/head
Kubernetes Submit Queue 2017-09-26 23:12:24 -07:00 committed by GitHub
commit 2456fcc60c
1 changed files with 4 additions and 4 deletions

View File

@ -62,10 +62,6 @@ var _ = SIGDescribe("[Serial] Volume metrics", func() {
if err != nil { if err != nil {
framework.Failf("Error creating metrics grabber : %v", err) framework.Failf("Error creating metrics grabber : %v", err)
} }
if !metricsGrabber.HasRegisteredMaster() {
framework.Skipf("Environment does not support getting controller-manager metrics - skipping")
}
}) })
AfterEach(func() { AfterEach(func() {
@ -75,6 +71,10 @@ var _ = SIGDescribe("[Serial] Volume metrics", func() {
It("should create prometheus metrics for volume provisioning and attach/detach", func() { It("should create prometheus metrics for volume provisioning and attach/detach", func() {
var err error var err error
if !metricsGrabber.HasRegisteredMaster() {
framework.Skipf("Environment does not support getting controller-manager metrics - skipping")
}
controllerMetrics, err := metricsGrabber.GrabFromControllerManager() controllerMetrics, err := metricsGrabber.GrabFromControllerManager()
Expect(err).NotTo(HaveOccurred(), "Error getting c-m metrics : %v", err) Expect(err).NotTo(HaveOccurred(), "Error getting c-m metrics : %v", err)