mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-09-08 18:50:13 +00:00
This reverts commit 750a10d44c
.
This commit is contained in:
@@ -94,26 +94,6 @@ func GetParent(client *kubernetes.Client, meta metav1.ObjectMeta) (string, bool)
|
||||
return GetParent(client, ds.ObjectMeta)
|
||||
}
|
||||
return "Ingress/" + ds.Name, false
|
||||
|
||||
case "MutatingWebhookConfiguration":
|
||||
mw, err := client.GetClient().AdmissionregistrationV1().MutatingWebhookConfigurations().Get(context.Background(), owner.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return "", false
|
||||
}
|
||||
if mw.OwnerReferences != nil {
|
||||
return GetParent(client, mw.ObjectMeta)
|
||||
}
|
||||
return "MutatingWebhook/" + mw.Name, false
|
||||
|
||||
case "ValidatingWebhookConfiguration":
|
||||
vw, err := client.GetClient().AdmissionregistrationV1().ValidatingWebhookConfigurations().Get(context.Background(), owner.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return "", false
|
||||
}
|
||||
if vw.OwnerReferences != nil {
|
||||
return GetParent(client, vw.ObjectMeta)
|
||||
}
|
||||
return "ValidatingWebhook/" + vw.Name, false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user