class KubernetesClientConfigServerBootstrapper extends KubernetesConfigServerBootstrapper {

	private static final Log LOG = LogFactory.getLog(KubernetesClientConfigServerBootstrapper.class);

	@Override
	public void initialize(BootstrapRegistry registry) {<FILL_FUNCTION_BODY>}

	private String getInformerNamespace(KubernetesNamespaceProvider kubernetesNamespaceProvider,
			KubernetesDiscoveryProperties discoveryProperties) {
		return discoveryProperties.allNamespaces() ? Namespaces.NAMESPACE_ALL
				: kubernetesNamespaceProvider.getNamespace() == null ? Namespaces.NAMESPACE_DEFAULT
						: kubernetesNamespaceProvider.getNamespace();
	}

	private Environment getNamespaceEnvironment(
			ConfigServerConfigDataLocationResolver.PropertyResolver propertyResolver) {
		return new AbstractEnvironment() {
			@Override
			public String getProperty(String key) {
				return propertyResolver.get(key, String.class, super.getProperty(key));
			}
		};
	}

}

		if (hasConfigServerInstanceProvider()) {
			return;
		}
		registry.registerIfAbsent(KubernetesDiscoveryProperties.class, context -> {
			if (!getDiscoveryEnabled(context)) {
				return null;
			}
			return createKubernetesDiscoveryProperties(context);
		});

		registry.registerIfAbsent(KubernetesClientProperties.class, context -> {
			if (!getDiscoveryEnabled(context)) {
				return null;
			}
			return createKubernetesClientProperties(context);
		});
		registry.registerIfAbsent(ConfigServerInstanceProvider.Function.class, context -> {
			if (!getDiscoveryEnabled(context)) {
				return (id) -> Collections.emptyList();
			}
			if (context.isRegistered(KubernetesInformerDiscoveryClient.class)) {
				KubernetesInformerDiscoveryClient client = context.get(KubernetesInformerDiscoveryClient.class);
				return client::getInstances;
			}
			else {
				PropertyResolver propertyResolver = getPropertyResolver(context);
				ApiClient defaultApiClient = kubernetesApiClient();
				defaultApiClient.setUserAgent(propertyResolver.get("spring.cloud.kubernetes.client.user-agent",
						String.class, KubernetesClientProperties.DEFAULT_USER_AGENT));
				KubernetesClientAutoConfiguration clientAutoConfiguration = new KubernetesClientAutoConfiguration();
				ApiClient apiClient = context.getOrElseSupply(ApiClient.class, () -> defaultApiClient);

				KubernetesNamespaceProvider kubernetesNamespaceProvider = clientAutoConfiguration
						.kubernetesNamespaceProvider(getNamespaceEnvironment(propertyResolver));
				KubernetesDiscoveryProperties discoveryProperties = context.get(KubernetesDiscoveryProperties.class);
				String namespace = getInformerNamespace(kubernetesNamespaceProvider, discoveryProperties);
				SharedInformerFactory sharedInformerFactory = new SharedInformerFactory(apiClient);
				GenericKubernetesApi<V1Service, V1ServiceList> servicesApi = new GenericKubernetesApi<>(V1Service.class,
						V1ServiceList.class, "", "v1", "services", apiClient);
				SharedIndexInformer<V1Service> serviceSharedIndexInformer = sharedInformerFactory
						.sharedIndexInformerFor(servicesApi, V1Service.class, 0L, namespace);
				Lister<V1Service> serviceLister = new Lister<>(serviceSharedIndexInformer.getIndexer());
				GenericKubernetesApi<V1Endpoints, V1EndpointsList> endpointsApi = new GenericKubernetesApi<>(
						V1Endpoints.class, V1EndpointsList.class, "", "v1", "endpoints", apiClient);
				SharedIndexInformer<V1Endpoints> endpointsSharedIndexInformer = sharedInformerFactory
						.sharedIndexInformerFor(endpointsApi, V1Endpoints.class, 0L, namespace);
				Lister<V1Endpoints> endpointsLister = new Lister<>(endpointsSharedIndexInformer.getIndexer());
				KubernetesInformerDiscoveryClient discoveryClient = new KubernetesInformerDiscoveryClient(
						sharedInformerFactory, serviceLister, endpointsLister, serviceSharedIndexInformer,
						endpointsSharedIndexInformer, discoveryProperties);
				try {
					discoveryClient.afterPropertiesSet();
					return discoveryClient::getInstances;
				}
				catch (Exception e) {
					LOG.warn("Error initiating informer discovery client", e);
					return (serviceId) -> Collections.emptyList();
				}
				finally {
					sharedInformerFactory.stopAllRegisteredInformers();
				}
			}
		});

	
<methods>public non-sealed void <init>() ,public static KubernetesClientProperties createKubernetesClientProperties(org.springframework.boot.context.properties.bind.Binder, org.springframework.boot.context.properties.bind.BindHandler) ,public static KubernetesClientProperties createKubernetesClientProperties(org.springframework.boot.BootstrapContext) ,public static KubernetesDiscoveryProperties createKubernetesDiscoveryProperties(org.springframework.boot.context.properties.bind.Binder, org.springframework.boot.context.properties.bind.BindHandler) ,public static KubernetesDiscoveryProperties createKubernetesDiscoveryProperties(org.springframework.boot.BootstrapContext) ,public static java.lang.Boolean getDiscoveryEnabled(org.springframework.boot.context.properties.bind.Binder, org.springframework.boot.context.properties.bind.BindHandler) ,public static java.lang.Boolean getDiscoveryEnabled(org.springframework.boot.BootstrapContext) ,public static boolean hasConfigServerInstanceProvider() <variables>