mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-07 08:07:42 +00:00
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>
This commit is contained in:
parent
b45089ad85
commit
370ec6b46b
@ -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")
|
crl := childResourceLabels(ing.Name, ing.Namespace, "ingress")
|
||||||
var tags []string
|
var tags []string
|
||||||
if tstr, ok := ing.Annotations[AnnotationTags]; ok {
|
if tstr, ok := ing.Annotations[AnnotationTags]; ok {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user