File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ import (
33
33
"k8s.io/kubernetes/pkg/kubelet/cm"
34
34
"k8s.io/kubernetes/pkg/kubelet/config"
35
35
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
36
+ kubelettypes "k8s.io/kubernetes/pkg/kubelet/types"
36
37
utilnode "k8s.io/kubernetes/pkg/util/node"
37
38
)
38
39
@@ -167,8 +168,11 @@ func (kl *Kubelet) GetPods() []*v1.Pod {
167
168
// a kubelet running without apiserver requires an additional
168
169
// update of the static pod status. See #57106
169
170
for _ , p := range pods {
170
- if status , ok := kl .statusManager .GetPodStatus (p .UID ); ok {
171
- p .Status = status
171
+ if kubelettypes .IsStaticPod (p ) {
172
+ if status , ok := kl .statusManager .GetPodStatus (p .UID ); ok {
173
+ klog .V (2 ).Infof ("status for pod %v updated to %v" , p .Name , status )
174
+ p .Status = status
175
+ }
172
176
}
173
177
}
174
178
return pods
You can’t perform that action at this time.
0 commit comments