Merge pull request #17002 from feihujiang/removeUseOfLegacyPodsProxyPath

Auto commit by PR queue bot
pull/6/head
k8s-merge-robot 2015-11-09 17:13:40 -08:00
commit a436da79fb
5 changed files with 10 additions and 9 deletions

View File

@ -133,9 +133,9 @@ func assertFilesExist(fileNames []string, fileDir string, pod *api.Pod, client *
failed = []string{}
for _, fileName := range fileNames {
if _, err := client.Get().
Prefix("proxy").
Resource("pods").
Namespace(pod.Namespace).
Resource("pods").
SubResource("proxy").
Name(pod.Name).
Suffix(fileDir, fileName).
Do().Raw(); err != nil {

View File

@ -260,10 +260,10 @@ var _ = Describe("Kubectl client", func() {
Failf("unable to create streaming upload. Error: %s", err)
}
resp, err := c.Post().
Prefix("proxy").
Namespace(ns).
Name("netexec").
Resource("pods").
SubResource("proxy").
Suffix("upload").
SetHeader("Content-Type", postConfigBodyWriter.FormDataContentType()).
Body(pipeConfigReader).
@ -287,10 +287,10 @@ var _ = Describe("Kubectl client", func() {
var uploadOutput NetexecOutput
// Upload the kubectl binary
resp, err = c.Post().
Prefix("proxy").
Namespace(ns).
Name("netexec").
Resource("pods").
SubResource("proxy").
Suffix("upload").
SetHeader("Content-Type", postBodyWriter.FormDataContentType()).
Body(pipeReader).
@ -325,10 +325,10 @@ var _ = Describe("Kubectl client", func() {
shellCommand := fmt.Sprintf("%s=%s .%s --kubeconfig=%s --server=%s --namespace=%s exec nginx echo running in container", proxyVar, proxyAddr, uploadBinaryName, kubecConfigRemotePath, apiServer, ns)
// Execute kubectl on remote exec server.
netexecShellOutput, err := c.Post().
Prefix("proxy").
Namespace(ns).
Name("netexec").
Resource("pods").
SubResource("proxy").
Suffix("shell").
Param("shellCommand", shellCommand).
Do().Raw()
@ -1121,9 +1121,9 @@ func getUDData(jpgExpected string, ns string) func(*client.Client, string) error
return func(c *client.Client, podID string) error {
Logf("validating pod %s", podID)
body, err := c.Get().
Prefix("proxy").
Namespace(ns).
Resource("pods").
SubResource("proxy").
Name(podID).
Suffix("data.json").
Do().

View File

@ -118,8 +118,9 @@ func testPreStop(c *client.Client, ns string) {
// Validate that the server received the web poke.
err = wait.Poll(time.Second*5, time.Second*60, func() (bool, error) {
if body, err := c.Get().
Namespace(ns).Prefix("proxy").
Namespace(ns).
Resource("pods").
SubResource("proxy").
Name(podDescr.Name).
Suffix("read").
DoRaw(); err != nil {

View File

@ -802,9 +802,9 @@ func (r podResponseChecker) checkAllResponses() (done bool, err error) {
return false, fmt.Errorf("pod with UID %s is no longer a member of the replica set. Must have been restarted for some reason. Current replica set: %v", pod.UID, currentPods)
}
body, err := r.c.Get().
Prefix("proxy").
Namespace(r.ns).
Resource("pods").
SubResource("proxy").
Name(string(pod.Name)).
Do().
Raw()

View File

@ -227,8 +227,8 @@ func testVolumeClient(client *client.Client, config VolumeTestConfig, volume api
By("reading a web page from the client")
body, err := client.Get().
Namespace(config.namespace).
Prefix("proxy").
Resource("pods").
SubResource("proxy").
Name(clientPod.Name).
DoRaw()
expectNoError(err, "Cannot read web page: %v", err)