ElementTech/kube-reqsizer

Error when trying to get stats of pods that are not in a running state

Opened this issue · 0 comments

When trying to get stats from a not running pod in status: "OOMKilled", "Completed", "ContainerStatusUnknown"

1.7075000655863886e+09	ERROR	controllers.Pod	failed to get stats from pod	{"pod": "dev/hotstorage-semantic-data-cronjob-28457520-smrv9"}
github.com/jatalocks/kube-reqsizer/controllers.(*PodReconciler).Reconcile
	/workspace/controllers/pod_controller.go:149
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/internal/controller/controller.go:121
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/internal/controller/controller.go:320
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/internal/controller/controller.go:273
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/internal/controller/controller.go:234
1.7075000655867434e+09	ERROR	Reconciler error	{"controller": "pod", "controllerGroup": "", "controllerKind": "Pod", "Pod": {"name":"hotstorage-semantic-data-cronjob-28457520-smrv9","namespace":"dev"}, "namespace": "dev", "name": "hotstorage-semantic-data-cronjob-28457520-smrv9", "reconcileID": "8222a6cf-2169-4a40-b9b3-e99ea85421da", "error": "the server could not find the requested resource"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/internal/controller/controller.go:326
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/internal/controller/controller.go:273
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/internal/controller/controller.go:234