This is a tracking issue of a bug for which a workaround has been implemented in number of places for this time until its resolved globally.
What happens
ScaledObject is sometimes not cached correctly -> for example the metrics are an empty list or the .Status.ScaleTargetGVKR is nil
Workaround
A workaround has been implemented in a number of places. See below.
pkg/scaling/scale_handler.go in func (h *scaleHandler) getTrueMetricArray()
pkg/scaling/resolver/scale_resolvers.go in func ResolveScaleTargetPodSpec()
Other info
initial related issue link
/kind bug
This is a tracking issue of a bug for which a workaround has been implemented in number of places for this time until its resolved globally.
What happens
ScaledObject is sometimes not cached correctly -> for example the metrics are an empty list or the
.Status.ScaleTargetGVKRis nilWorkaround
A workaround has been implemented in a number of places. See below.
pkg/scaling/scale_handler.goinfunc (h *scaleHandler) getTrueMetricArray()pkg/scaling/resolver/scale_resolvers.goinfunc ResolveScaleTargetPodSpec()Other info
initial related issue link
/kind bug