cmd/k8s-operator: don't proceed with Ingress that has no valid backends (#10919)

Do not provision resources for a tailscale Ingress that has no valid backends.

Updates tailscale/tailscale#10910

Signed-off-by: Irbe Krumina <irbe@tailscale.com>
clairew/add-disco-pong-padding
Irbe Krumina 5 months ago committed by GitHub
parent b45089ad85
commit 370ec6b46b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -230,6 +230,12 @@ func (a *IngressReconciler) maybeProvision(ctx context.Context, logger *zap.Suga
}
}
if len(web.Handlers) == 0 {
logger.Warn("Ingress contains no valid backends")
a.recorder.Eventf(ing, corev1.EventTypeWarning, "NoValidBackends", "no valid backends")
return nil
}
crl := childResourceLabels(ing.Name, ing.Namespace, "ingress")
var tags []string
if tstr, ok := ing.Annotations[AnnotationTags]; ok {

Loading…
Cancel
Save