Remove static pod check

This commit is contained in:
Ayato Tokubi
2025-10-31 13:38:07 +00:00
parent ce3f6b1d0e
commit a98cd90701
2 changed files with 0 additions and 7 deletions

View File

@@ -2626,7 +2626,6 @@ func (kl *Kubelet) convertToAPIContainerStatuses(pod *v1.Pod, podStatus *kubecon
// When the init container is a sidecar container, it should be waiting (and will be restarted).
isSidecar := container.RestartPolicy != nil && *container.RestartPolicy == v1.ContainerRestartPolicyAlways
if s == nil &&
kubetypes.IsStaticPod(pod) &&
kuberuntime.HasAnyRegularContainerCreated(pod, podStatus) &&
!isSidecar &&
statuses[container.Name].State.Waiting != nil {

View File

@@ -4085,9 +4085,6 @@ func TestConvertToAPIContainerStatuses(t *testing.T) {
pod: &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "my-pod",
Annotations: map[string]string{
kubetypes.ConfigSourceAnnotationKey: "file", // static pod
},
},
Spec: desiredStateWithInitContainer,
Status: v1.PodStatus{
@@ -4126,9 +4123,6 @@ func TestConvertToAPIContainerStatuses(t *testing.T) {
pod: &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "my-pod",
Annotations: map[string]string{
kubetypes.ConfigSourceAnnotationKey: "file", // static pod
},
},
Spec: desiredStateWithSidecarContainer,
Status: v1.PodStatus{