mirror of https://github.com/k3s-io/k3s
Merge pull request #17002 from feihujiang/removeUseOfLegacyPodsProxyPath
Auto commit by PR queue botpull/6/head
commit
a436da79fb
|
@ -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 {
|
||||
|
|
|
@ -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().
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue