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:
Aris Boutselis
2023-07-20 15:49:06 +03:00
committed by GitHub
parent 9d2bee9b7d
commit 153d38deb0

View File

@@ -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{})