public bool Update(WatchEventType eventType, V1Ingress ingress) { if (ingress is null) { throw new ArgumentNullException(nameof(ingress)); } if (IsYarpIngress(ingress.Spec)) { Namespace(ingress.Namespace()).Update(eventType, ingress); return(true); } #pragma warning disable CA1303 // Do not pass literals as localized parameters if (eventType == WatchEventType.Modified && Namespace(ingress.Namespace()).IngressExists(ingress)) { // Special handling for an ingress that has the ingressClassName removed _logger.LogInformation("Removing ingress {IngressNamespace}/{IngressName} because of unknown ingress class", ingress.Metadata.NamespaceProperty, ingress.Metadata.Name); Namespace(ingress.Namespace()).Update(WatchEventType.Deleted, ingress); return(true); } _logger.LogInformation("Ignoring ingress {IngressNamespace}/{IngressName} because of ingress class", ingress.Metadata.NamespaceProperty, ingress.Metadata.Name); #pragma warning restore CA1303 // Do not pass literals as localized parameters return(false); }
public void Update(WatchEventType eventType, V1Ingress ingress) { if (ingress is null) { throw new ArgumentNullException(nameof(ingress)); } Namespace(ingress.Namespace()).Update(eventType, ingress); }