Skip to content

Commit

Permalink
Merge pull request #123358 from pacoxu/fix-cri-stats-panic
Browse files Browse the repository at this point in the history
fix panic in CRI stats of windows
  • Loading branch information
k8s-ci-robot committed Feb 27, 2024
2 parents 47c92e2 + 0f49a1e commit 1221767
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kubelet/stats/cri_stats_provider_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (p *criStatsProvider) addCRIPodContainerStats(criSandboxStat *runtimeapi.Po
podSandbox *runtimeapi.PodSandbox,
rootFsInfo *cadvisorapiv2.FsInfo,
updateCPUNanoCoreUsage bool) error {
for _, criContainerStat := range criSandboxStat.Windows.Containers {
for _, criContainerStat := range criSandboxStat.GetWindows().GetContainers() {
container, found := containerMap[criContainerStat.Attributes.Id]
if !found {
continue
Expand Down

0 comments on commit 1221767

Please sign in to comment.