1
0
Fork 0

Fix panic for empty defaultBackend and defaultBackend without resources

This commit is contained in:
Gina A. 2026-01-07 09:38:05 +01:00 committed by GitHub
parent be27044099
commit 5d00096f82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 51 additions and 0 deletions

View file

@ -269,6 +269,17 @@ func (p *Provider) loadConfigurationFromIngresses(ctx context.Context, client Cl
continue
}
if ingress.Spec.DefaultBackend.Resource != nil {
// https://kubernetes.io/docs/concepts/services-networking/ingress/#resource-backend
logger.Error().Msg("Resource is not supported for default backend")
continue
}
if ingress.Spec.DefaultBackend.Service == nil {
logger.Error().Msg("Default backend is missing service definition")
continue
}
service, err := p.loadService(client, ingress.Namespace, *ingress.Spec.DefaultBackend)
if err != nil {
logger.Error().