mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-09-18 08:14:37 +00:00
chore: continue on absent service (#569)
Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com> Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
This commit is contained in:
@@ -53,6 +53,9 @@ func (MutatingWebhookAnalyzer) Analyze(a common.Analyzer) ([]common.Result, erro
|
||||
for _, webhook := range webhookConfig.Webhooks {
|
||||
var failures []common.Failure
|
||||
|
||||
if webhook.ClientConfig.Service == nil {
|
||||
continue
|
||||
}
|
||||
svc := webhook.ClientConfig.Service
|
||||
// Get the service
|
||||
service, err := a.Client.GetClient().CoreV1().Services(svc.Namespace).Get(context.Background(), svc.Name, v1.GetOptions{})
|
||||
|
Reference in New Issue
Block a user