mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-22 09:40:07 +00:00
Remove static pod check
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user