mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Fix the kubelet uses api encode/decode by actually adding PodContainerInfo to v1beta1
This commit is contained in:
parent
a6f967b6e7
commit
d345dda1e5
@ -203,7 +203,7 @@ func TestList(t *testing.T) {
|
|||||||
api.Scheme.Log(nil)
|
api.Scheme.Log(nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
var nonRoundTrippableTypes = util.NewStringSet("ContainerManifest", "PodContainerInfo")
|
var nonRoundTrippableTypes = util.NewStringSet("ContainerManifest")
|
||||||
var nonInternalRoundTrippableTypes = util.NewStringSet("List")
|
var nonInternalRoundTrippableTypes = util.NewStringSet("List")
|
||||||
|
|
||||||
func TestRoundTripTypes(t *testing.T) {
|
func TestRoundTripTypes(t *testing.T) {
|
||||||
|
@ -31,6 +31,7 @@ func init() {
|
|||||||
|
|
||||||
api.Scheme.AddKnownTypes("v1beta1",
|
api.Scheme.AddKnownTypes("v1beta1",
|
||||||
&Pod{},
|
&Pod{},
|
||||||
|
&PodContainerInfo{},
|
||||||
&PodList{},
|
&PodList{},
|
||||||
&ReplicationController{},
|
&ReplicationController{},
|
||||||
&ReplicationControllerList{},
|
&ReplicationControllerList{},
|
||||||
@ -58,6 +59,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (*Pod) IsAnAPIObject() {}
|
func (*Pod) IsAnAPIObject() {}
|
||||||
|
func (*PodContainerInfo) IsAnAPIObject() {}
|
||||||
func (*PodList) IsAnAPIObject() {}
|
func (*PodList) IsAnAPIObject() {}
|
||||||
func (*ReplicationController) IsAnAPIObject() {}
|
func (*ReplicationController) IsAnAPIObject() {}
|
||||||
func (*ReplicationControllerList) IsAnAPIObject() {}
|
func (*ReplicationControllerList) IsAnAPIObject() {}
|
||||||
|
@ -20,7 +20,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -116,7 +115,6 @@ func (c *HTTPKubeletClient) GetPodInfo(host, podNamespace, podID string) (api.Po
|
|||||||
return info, err
|
return info, err
|
||||||
}
|
}
|
||||||
// Check that this data can be unmarshalled
|
// Check that this data can be unmarshalled
|
||||||
log.Printf("FOOO: %s", string(body))
|
|
||||||
err = latest.Codec.DecodeInto(body, &info)
|
err = latest.Codec.DecodeInto(body, &info)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return info, err
|
return info, err
|
||||||
|
Loading…
Reference in New Issue
Block a user