mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Merge pull request #127195 from yaojunyu/fix-pod-alway-restart-open-envetedpleg
EventedPLEG: Set Timestamp in PodStatus for Generic PLEG more accurate
This commit is contained in:
commit
d1e03f3a77
@ -1538,7 +1538,7 @@ func (m *kubeGenericRuntimeManager) GetPodStatus(ctx context.Context, uid kubety
|
||||
|
||||
sandboxStatuses := []*runtimeapi.PodSandboxStatus{}
|
||||
containerStatuses := []*kubecontainer.Status{}
|
||||
var timestamp time.Time
|
||||
timestamp := time.Now()
|
||||
|
||||
podIPs := []string{}
|
||||
for idx, podSandboxID := range podSandboxIDs {
|
||||
@ -1582,7 +1582,7 @@ func (m *kubeGenericRuntimeManager) GetPodStatus(ctx context.Context, uid kubety
|
||||
} else {
|
||||
// Get the statuses of all containers visible to the pod and
|
||||
// timestamp from sandboxStatus.
|
||||
timestamp = time.Unix(resp.Timestamp, 0)
|
||||
timestamp = time.Unix(0, resp.Timestamp)
|
||||
for _, cs := range resp.ContainersStatuses {
|
||||
cStatus := m.convertToKubeContainerStatus(cs)
|
||||
containerStatuses = append(containerStatuses, cStatus)
|
||||
|
Loading…
Reference in New Issue
Block a user