mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-08-31 06:35:22 +00:00
fix: update client API call to use StatefulSet instead of Deployment
Co-authored-by: Dominik Augustin <yeahservice@users.noreply.github.com> Signed-off-by: Matthis Holleville <matthish29@gmail.com>
This commit is contained in:
committed by
Matthis Holleville
parent
360387249f
commit
4916fef9d6
@@ -44,7 +44,7 @@ func AnalyzeHpa(ctx context.Context, config *AnalysisConfiguration, client *kube
|
||||
scaleTargetRefNotFound = true
|
||||
}
|
||||
case "StatefulSet":
|
||||
_, err := client.GetClient().AppsV1().Deployments(config.Namespace).Get(ctx, scaleTargetRef.Name, metav1.GetOptions{})
|
||||
_, err := client.GetClient().AppsV1().StatefulSets(config.Namespace).Get(ctx, scaleTargetRef.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
scaleTargetRefNotFound = true
|
||||
}
|
||||
|
Reference in New Issue
Block a user