class KubernetesClientInformerAutoConfiguration {

	private static final LogAccessor LOG = new LogAccessor(
			LogFactory.getLog(KubernetesClientInformerAutoConfiguration.class));

	@Bean
	@ConditionalOnMissingBean
	public SharedInformerFactory sharedInformerFactory(ApiClient client) {
		LOG.debug(() -> "registering sharedInformerFactory for non-selective namespaces");
		return new SharedInformerFactory(client);
	}

	@Bean
	public String kubernetesClientNamespace(KubernetesDiscoveryProperties properties,
			KubernetesNamespaceProvider provider) {<FILL_FUNCTION_BODY>}

	@Bean
	@ConditionalOnMissingBean(value = V1Service.class, parameterizedContainer = SharedIndexInformer.class)
	public SharedIndexInformer<V1Service> servicesSharedIndexInformer(SharedInformerFactory sharedInformerFactory,
			ApiClient apiClient, String kubernetesClientNamespace) {

		GenericKubernetesApi<V1Service, V1ServiceList> servicesApi = new GenericKubernetesApi<>(V1Service.class,
				V1ServiceList.class, "", "v1", "services", apiClient);

		return sharedInformerFactory.sharedIndexInformerFor(servicesApi, V1Service.class, 0L,
				kubernetesClientNamespace);
	}

	@Bean
	@ConditionalOnMissingBean(value = V1Endpoints.class, parameterizedContainer = SharedIndexInformer.class)
	public SharedIndexInformer<V1Endpoints> endpointsSharedIndexInformer(SharedInformerFactory sharedInformerFactory,
			ApiClient apiClient, String kubernetesClientNamespace) {

		GenericKubernetesApi<V1Endpoints, V1EndpointsList> servicesApi = new GenericKubernetesApi<>(V1Endpoints.class,
				V1EndpointsList.class, "", "v1", "endpoints", apiClient);

		return sharedInformerFactory.sharedIndexInformerFor(servicesApi, V1Endpoints.class, 0L,
				kubernetesClientNamespace);
	}

	@Bean
	@ConditionalOnMissingBean(value = V1Service.class, parameterizedContainer = Lister.class)
	public Lister<V1Service> servicesLister(SharedIndexInformer<V1Service> servicesSharedIndexInformer,
			String kubernetesClientNamespace) {
		return new Lister<>(servicesSharedIndexInformer.getIndexer(), kubernetesClientNamespace);
	}

	@Bean
	@ConditionalOnMissingBean(value = V1Endpoints.class, parameterizedContainer = Lister.class)
	public Lister<V1Endpoints> endpointsLister(SharedIndexInformer<V1Endpoints> endpointsSharedIndexInformer,
			String kubernetesClientNamespace) {
		return new Lister<>(endpointsSharedIndexInformer.getIndexer(), kubernetesClientNamespace);
	}

}

		String namespace;
		if (properties.allNamespaces()) {
			namespace = NAMESPACE_ALL;
			LOG.debug(() -> "serviceSharedInformer will use all-namespaces");
		}
		else {
			try {
				namespace = getApplicationNamespace(null, "kubernetes client discovery", provider);
			}
			catch (NamespaceResolutionFailedException ex) {
				LOG.warn(() -> "failed to resolve namespace, defaulting to :" + NAMESPACE_DEFAULT
						+ ". This will fail in a future release.");
				namespace = NAMESPACE_DEFAULT;
			}
			LOG.debug("serviceSharedInformer will use namespace : " + namespace);
		}

		return namespace;
	
<no_super_class>