class Fabric8ConfigUtils {

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

	private Fabric8ConfigUtils() {
	}

	/**
	 * finds namespaces to be used for the event based reloading.
	 */
	public static Set<String> namespaces(KubernetesClient client, KubernetesNamespaceProvider provider,
			ConfigReloadProperties properties, String target) {
		Set<String> namespaces = properties.namespaces();
		if (namespaces.isEmpty()) {
			namespaces = Set.of(Fabric8Utils.getApplicationNamespace(client, null, target, provider));
		}
		LOG.debug("informer namespaces : " + namespaces);
		return namespaces;
	}

	/**
	 * <pre>
	 *     1. read all secrets in the provided namespace
	 *     2. from the above, filter the ones that we care about (filter by labels)
	 *     3. with secret names from (2), find out if there are any profile based secrets (if profiles is not empty)
	 *     4. concat (2) and (3) and these are the secrets we are interested in
	 *     5. see if any of the secrets from (4) has a single yaml/properties file
	 *     6. gather all the names of the secrets (from 4) + data they hold
	 * </pre>
	 */
	static MultipleSourcesContainer secretsDataByLabels(KubernetesClient client, String namespace,
			Map<String, String> labels, Environment environment, Set<String> profiles) {
		List<StrippedSourceContainer> strippedSecrets = strippedSecrets(client, namespace);
		if (strippedSecrets.isEmpty()) {
			return MultipleSourcesContainer.empty();
		}
		return ConfigUtils.processLabeledData(strippedSecrets, environment, labels, namespace, profiles, true);
	}

	/**
	 * <pre>
	 *     1. read all config maps in the provided namespace
	 *     2. from the above, filter the ones that we care about (filter by labels)
	 *     3. with config maps names from (2), find out if there are any profile based ones (if profiles is not empty)
	 *     4. concat (2) and (3) and these are the config maps we are interested in
	 *     5. see if any from (4) has a single yaml/properties file
	 *     6. gather all the names of the config maps (from 4) + data they hold
	 * </pre>
	 */
	static MultipleSourcesContainer configMapsDataByLabels(KubernetesClient client, String namespace,
			Map<String, String> labels, Environment environment, Set<String> profiles) {
		List<StrippedSourceContainer> strippedConfigMaps = strippedConfigMaps(client, namespace);
		if (strippedConfigMaps.isEmpty()) {
			return MultipleSourcesContainer.empty();
		}

		return ConfigUtils.processLabeledData(strippedConfigMaps, environment, labels, namespace, profiles, false);
	}

	/**
	 * <pre>
	 *     1. read all secrets in the provided namespace
	 *     2. from the above, filter the ones that we care about (by name)
	 *     3. see if any of the secrets has a single yaml/properties file
	 *     4. gather all the names of the secrets + decoded data they hold
	 * </pre>
	 */
	static MultipleSourcesContainer secretsDataByName(KubernetesClient client, String namespace,
			LinkedHashSet<String> sourceNames, Environment environment) {
		List<StrippedSourceContainer> strippedSecrets = strippedSecrets(client, namespace);
		if (strippedSecrets.isEmpty()) {
			return MultipleSourcesContainer.empty();
		}
		return ConfigUtils.processNamedData(strippedSecrets, environment, sourceNames, namespace, true);
	}

	/**
	 * <pre>
	 *     1. read all config maps in the provided namespace
	 *     2. from the above, filter the ones that we care about (by name)
	 *     3. see if any of the config maps has a single yaml/properties file
	 *     4. gather all the names of the config maps + data they hold
	 * </pre>
	 */
	static MultipleSourcesContainer configMapsDataByName(KubernetesClient client, String namespace,
			LinkedHashSet<String> sourceNames, Environment environment) {<FILL_FUNCTION_BODY>}

	private static List<StrippedSourceContainer> strippedConfigMaps(KubernetesClient client, String namespace) {
		List<StrippedSourceContainer> strippedConfigMaps = Fabric8ConfigMapsCache.byNamespace(client, namespace);
		if (strippedConfigMaps.isEmpty()) {
			LOG.debug("No configmaps in namespace '" + namespace + "'");
		}

		return strippedConfigMaps;
	}

	private static List<StrippedSourceContainer> strippedSecrets(KubernetesClient client, String namespace) {
		List<StrippedSourceContainer> strippedSecrets = Fabric8SecretsCache.byNamespace(client, namespace);
		if (strippedSecrets.isEmpty()) {
			LOG.debug("No secrets in namespace '" + namespace + "'");
		}

		return strippedSecrets;
	}

}

		List<StrippedSourceContainer> strippedConfigMaps = strippedConfigMaps(client, namespace);
		if (strippedConfigMaps.isEmpty()) {
			return MultipleSourcesContainer.empty();
		}
		return ConfigUtils.processNamedData(strippedConfigMaps, environment, sourceNames, namespace, false);
	
<no_super_class>