private async Task AddIngress(V1Ingress ingress, CancellationToken cancellation)
        {
            var legacyIngressClass = ingress.LegacyIngressClass();

            if (!IngressMatch(ingress, legacyIngressClass))
            {
                _logger.LogInformation($"Ignoring ingress ingress={ingress.Metadata.NamespaceProperty}/{ingress.Metadata.Name} kubernetes.io/ingress.class={legacyIngressClass} ingressClassName={ingress.Spec.IngressClassName}");
                return;
            }

            var model  = ingress.ToModel();
            var objRef = new V1ObjectReference
            {
                Kind              = V1Ingress.KubeKind,
                ApiVersion        = V1Ingress.KubeGroup + "/" + V1Ingress.KubeApiVersion,
                Name              = model.Name,
                NamespaceProperty = model.Namespace,
                Uid             = ingress.Metadata.Uid,
                ResourceVersion = ingress.Metadata.ResourceVersion,
            };

            await _eventRecorder.CreateEvent(objRef, KubeEvent.EventType.Normal, "Sync", "Scheduled for sync", cancellation);

            var key = ingress.Metadata.Uid;

            _ingresses.AddOrUpdate(key, a => model, (s, u) => model);

            RaiseChanged();
        }
        private void UpdateIngress(V1Ingress ingress)
        {
            var legacyIngressClass = ingress.LegacyIngressClass();

            if (!IngressMatch(ingress, legacyIngressClass))
            {
                return;
            }

            var model = ingress.ToModel();
            var key   = ingress.Metadata.Uid;

            _ingresses.AddOrUpdate(key, a => model, (s, u) => model);

            RaiseChanged();
        }