class KubernetesClientUtils {

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

	private KubernetesClientUtils() {
	}

	public static ApiClient createApiClientForInformerClient() {
		ApiClient apiClient = kubernetesApiClient();
		apiClient.setReadTimeout(0);
		return apiClient;
	}

	public static ApiClient kubernetesApiClient() {<FILL_FUNCTION_BODY>}

	/**
	 * this method does the namespace resolution for both config map and secrets
	 * implementations. It tries these places to find the namespace:
	 *
	 * <pre>
	 *     1. from a normalized source (which can be null)
	 *     2. from a property 'spring.cloud.kubernetes.client.namespace', if such is present
	 *     3. from a String residing in a file denoted by `spring.cloud.kubernetes.client.serviceAccountNamespacePath`
	 * 	      property, if such is present
	 * 	   4. from a String residing in `/var/run/secrets/kubernetes.io/serviceaccount/namespace` file,
	 * 	  	  if such is present (kubernetes default path)
	 * </pre>
	 *
	 * If any of the above fail, we throw a NamespaceResolutionFailedException.
	 * @param namespace normalized namespace
	 * @param configurationTarget Config Map/Secret
	 * @param provider the provider which computes the namespace
	 * @return application namespace
	 * @throws NamespaceResolutionFailedException when namespace could not be resolved
	 */
	public static String getApplicationNamespace(String namespace, String configurationTarget,
			KubernetesNamespaceProvider provider) {
		if (StringUtils.hasText(namespace)) {
			LOG.debug(configurationTarget + " namespace : " + namespace);
			return namespace;
		}

		if (provider != null) {
			String providerNamespace = provider.getNamespace();
			if (StringUtils.hasText(providerNamespace)) {
				LOG.debug(configurationTarget + " namespace from provider : " + namespace);
				return providerNamespace;
			}
		}

		throw new NamespaceResolutionFailedException("unresolved namespace");
	}

}

		try {
			// Assume we are running in a cluster
			ApiClient apiClient = ClientBuilder.cluster().build();
			LOG.info("Created API client in the cluster.");
			return apiClient;
		}
		catch (Exception e) {
			if (e instanceof IllegalStateException illegalStateException
					&& illegalStateException.getCause() instanceof NumberFormatException) {
				LOG.info("Could not create the Kubernetes ApiClient in a cluster environment, because connection port "
						+ "was not provided.");
			}
			else {
				LOG.info("Could not create the Kubernetes ApiClient in a cluster environment, because : ", e);
			}
			LOG.info("""
					Trying to use a "standard" configuration to create the Kubernetes ApiClient""");
			try {
				ApiClient apiClient = ClientBuilder.defaultClient();
				LOG.info("Created standard API client. Unless $KUBECONFIG or $HOME/.kube/config is defined, "
						+ "this client will try to connect to localhost:8080");
				return apiClient;
			}
			catch (Exception e1) {
				LOG.warn("Could not create a Kubernetes ApiClient from either a cluster or standard environment. "
						+ "Will return one that always connects to localhost:8080", e1);
				return new ClientBuilder().build();
			}
		}
	
<no_super_class>