From 49992e7e00f90827c578ebf72c8bc60730afdf71 Mon Sep 17 00:00:00 2001 From: zheng Date: Wed, 26 May 2021 11:42:54 +0800 Subject: [PATCH] add container when init from history provider --- .../pkg/recommender/input/cluster_feeder.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vertical-pod-autoscaler/pkg/recommender/input/cluster_feeder.go b/vertical-pod-autoscaler/pkg/recommender/input/cluster_feeder.go index 83081b6b5898..23b16657b1a5 100644 --- a/vertical-pod-autoscaler/pkg/recommender/input/cluster_feeder.go +++ b/vertical-pod-autoscaler/pkg/recommender/input/cluster_feeder.go @@ -239,6 +239,9 @@ func (feeder *clusterStateFeeder) InitFromHistoryProvider(historyProvider histor PodID: podID, ContainerName: containerName, } + if err = feeder.clusterState.AddOrUpdateContainer(containerID, nil); err != nil { + klog.Warningf("Failed to add container %+v. Reason: %+v", containerID, err) + } klog.V(4).Infof("Adding %d samples for container %v", len(sampleList), containerID) for _, sample := range sampleList { if err := feeder.clusterState.AddSample(