Skip to content

Commit

Permalink
chore: fixing edge cases with missing wh service (#561)
Browse files Browse the repository at this point in the history
* chore: fixing edge cases with missing wh service

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>

* chore: fixing edge cases with missing wh service

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>

* Update validating_webhook.go

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>

---------

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Aris Boutselis <aris.boutselis@senseon.io>
  • Loading branch information
AlexsJones and Aris Boutselis committed Jul 19, 2023
1 parent 2e0db55 commit c422215
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/analyzer/validating_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ func (ValidatingWebhookAnalyzer) Analyze(a common.Analyzer) ([]common.Result, er
for _, webhookConfig := range validatingWebhooks.Items {
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{})
Expand Down

0 comments on commit c422215

Please sign in to comment.