mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-12 12:48:51 +00:00
e2e: grab controller and scheduler metrics via port forwarding
The previous approach with grabbing via a nginx proxy had some drawbacks: - it did not work when the pods only listened on localhost (as configured by kubeadm) and the proxy got deployed on a different node - starting the proxy raced with starting the pods, causing sporadic test failures because the proxy was not set up properly unless it saw all pods when starting the e2e.test - the proxy was always started, whether it is needed or not - the proxy was left running after a test and then the next test run triggered potentially confusing messages when it failed to create objects for the proxy The new approach is similar to "kubectl port-forward" + "kubectl get --raw". It uses the port forwarding feature to establish a TCP connection via a custom dialer, then lets client-go handle TLS and credentials. Somehow verifying the server certificate did not work. As this shouldn't be a big concern for E2E testing, certificate checking gets disabled on the client side instead of investigating this further.
This commit is contained in:
@@ -115,7 +115,7 @@ func (t *volumeModeTestSuite) DefineTests(driver storageframework.TestDriver, pa
|
||||
|
||||
// Now do the more expensive test initialization.
|
||||
l.config, l.driverCleanup = driver.PrepareTest(f)
|
||||
l.migrationCheck = newMigrationOpCheck(f.ClientSet, dInfo.InTreePluginName)
|
||||
l.migrationCheck = newMigrationOpCheck(f.ClientSet, f.ClientConfig(), dInfo.InTreePluginName)
|
||||
}
|
||||
|
||||
// manualInit initializes l.VolumeResource without creating the PV & PVC objects.
|
||||
|
Reference in New Issue
Block a user