class KubernetesClientServicesFunctionProvider {

	private KubernetesClientServicesFunctionProvider() {
	}

	public static KubernetesClientServicesFunction servicesFunction(KubernetesDiscoveryProperties properties,
			Environment environment) {<FILL_FUNCTION_BODY>}

	@Deprecated(forRemoval = true)
	public static KubernetesClientServicesFunction servicesFunction(KubernetesDiscoveryProperties properties,
			Binder binder, BindHandler bindHandler) {
		return servicesFunction(properties, new KubernetesNamespaceProvider(binder, bindHandler));
	}

	public static KubernetesClientServicesFunction servicesFunction(KubernetesDiscoveryProperties properties,
			KubernetesNamespaceProvider namespaceProvider) {

		if (properties.allNamespaces()) {
			return (client) -> client.services().inAnyNamespace().withLabels(properties.serviceLabels());
		}

		return client -> {
			String namespace = Fabric8Utils.getApplicationNamespace(client, null, "discovery-service",
					namespaceProvider);
			return client.services().inNamespace(namespace).withLabels(properties.serviceLabels());
		};

	}

}


		if (properties.allNamespaces()) {
			return (client) -> client.services().inAnyNamespace().withLabels(properties.serviceLabels());
		}

		return client -> {
			String namespace = Fabric8Utils.getApplicationNamespace(client, null, "discovery-service",
					new KubernetesNamespaceProvider(environment));
			return client.services().inNamespace(namespace).withLabels(properties.serviceLabels());
		};

	
<no_super_class>