@Override
            public void eventReceived(Action action, Service service0) {
                if (closed) {
                    return;
                }

                numServiceFailures = 0;
                switch (action) {
                    case ADDED:
                    case MODIFIED:
                        if (!service0.getMetadata().getResourceVersion().equals(resourceVersion)) {
                            // Rebuild all resources if the service has been updated.
                            scheduleRestart(0);
                        }
                        break;
                    case DELETED:
                        logger.warn("[{}/{}] service is deleted.", namespace, serviceName);
                        // This situation should not occur in production.
                        break;
                    case ERROR:
                    case BOOKMARK:
                        // Do nothing.
                        break;
                }
            }
Watches the service. {@link Watcher} will retry automatically on failures by {@link KubernetesClient}.
kubernetes/src/main/java/com/linecorp/armeria/client/kubernetes/endpoints/KubernetesEndpointGroup.java