feat: check if ScaleTargetRef is possible option

Signed-off-by: Matthis Holleville <matthish29@gmail.com>
This commit is contained in:
Matthis Holleville
2023-03-31 19:47:10 +02:00
parent 4916fef9d6
commit 5dad75fbe9

View File

@@ -48,6 +48,8 @@ func AnalyzeHpa(ctx context.Context, config *AnalysisConfiguration, client *kube
if err != nil {
scaleTargetRefNotFound = true
}
default:
failures = append(failures, fmt.Sprintf("HorizontalPodAutoscaler uses %s as ScaleTargetRef which does not possible option.", scaleTargetRef.Kind))
}
if scaleTargetRefNotFound {