Skip to content

Commit 0ddb3d3

Browse files
authored
Merge pull request #7698 from voelzmo/fix/recommender-namespace-flags-for-informers
Make informer use correct namespace flag
2 parents adda3d4 + 391de4f commit 0ddb3d3

File tree

1 file changed

+2
-2
lines changed
  • vertical-pod-autoscaler/pkg/recommender

1 file changed

+2
-2
lines changed

vertical-pod-autoscaler/pkg/recommender/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ func run(healthCheck *metrics.HealthCheck, commonFlag *common.CommonFlags) {
208208
config := common.CreateKubeConfigOrDie(commonFlag.KubeConfig, float32(commonFlag.KubeApiQps), int(commonFlag.KubeApiBurst))
209209
kubeClient := kube_client.NewForConfigOrDie(config)
210210
clusterState := model.NewClusterState(aggregateContainerStateGCInterval)
211-
factory := informers.NewSharedInformerFactoryWithOptions(kubeClient, defaultResyncPeriod, informers.WithNamespace(commonFlag.IgnoredVpaObjectNamespaces))
211+
factory := informers.NewSharedInformerFactoryWithOptions(kubeClient, defaultResyncPeriod, informers.WithNamespace(commonFlag.VpaObjectNamespace))
212212
controllerFetcher := controllerfetcher.NewControllerFetcher(config, kubeClient, factory, scaleCacheEntryFreshnessTime, scaleCacheEntryLifetime, scaleCacheEntryJitterFactor)
213-
podLister, oomObserver := input.NewPodListerAndOOMObserver(kubeClient, commonFlag.IgnoredVpaObjectNamespaces, stopCh)
213+
podLister, oomObserver := input.NewPodListerAndOOMObserver(kubeClient, commonFlag.VpaObjectNamespace, stopCh)
214214

215215
model.InitializeAggregationsConfig(model.NewAggregationsConfig(*memoryAggregationInterval, *memoryAggregationIntervalCount, *memoryHistogramDecayHalfLife, *cpuHistogramDecayHalfLife, *oomBumpUpRatio, *oomMinBumpUp))
216216

0 commit comments

Comments
 (0)