mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 23:19:26 +00:00
Fixup kubelet handlePodInfo to be namespace aware
This commit is contained in:
@@ -228,17 +228,22 @@ func (s *Server) handlePodInfo(w http.ResponseWriter, req *http.Request) {
|
||||
}
|
||||
podID := u.Query().Get("podID")
|
||||
podUUID := u.Query().Get("UUID")
|
||||
podNamespace := u.Query().Get("podNamespace")
|
||||
if len(podID) == 0 {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
http.Error(w, "Missing 'podID=' query entry.", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
if len(podNamespace) == 0 {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
http.Error(w, "Missing 'podNamespace=' query entry.", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
// TODO: backwards compatibility with existing API, needs API change
|
||||
podFullName := GetPodFullName(&api.BoundPod{
|
||||
TypeMeta: api.TypeMeta{
|
||||
ID: podID,
|
||||
// TODO: I am broken
|
||||
Namespace: api.NamespaceDefault,
|
||||
ID: podID,
|
||||
Namespace: podNamespace,
|
||||
Annotations: map[string]string{ConfigSourceAnnotationKey: "etcd"},
|
||||
},
|
||||
})
|
||||
|
Reference in New Issue
Block a user